Skip to content

Learn to add missed changes without message alteration and modify previous commits for a cleaner version control history.

Notifications You must be signed in to change notification settings

mamadoudicko/clean-your-git-commit-history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Clean your git commit history

Edit last commit

  1. When you forget to include changes or files in your latest commit, use git commit --amend --no-edit to quickly add them without changing the commit message. πŸ› οΈπŸ’‘

  2. Remember to exercise caution, especially if the commit has been pushed to a shared repository. ⚠️🚫

  3. Always review your changes thoroughly before amending a commit to ensure a smooth version control workflow. πŸ‘€βœ¨πŸ”Ž

gcan!


Edit a Previous Commit

  1. When you need to fix or modify a previous commit, the git commit --fixup command comes to the rescue. It allows you to make necessary adjustments without creating a new commit. πŸ› οΈπŸ’‘

  2. By using git commit --fixup, you can associate your changes directly with the commit that requires fixing. This approach helps maintain a clean and organized commit history. πŸ‘₯✨

  3. It's important to note that when using --fixup, you should review your changes thoroughly to ensure they address the issues in the target commit accurately. This ensures a smooth version control workflow. πŸ‘€πŸ”Žβœ…

gcan!

About

Learn to add missed changes without message alteration and modify previous commits for a cleaner version control history.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published