Snippets
Created by
Ahmad Ajmi
last modified
I have two commits I need to squash into one commit, for example after I run git log
I get this view:
Next I did git rebase -i HEAD~2
and get this result:
The next step while I'm in this screen is to use s
command to squash from the second commit line, and after editing, the previous shot will be:
using Vim, I can save and quit :wq
.
Another window will open like:
this will contain all the commit messages for all the previous two commits, I can update them as I need. After editing, this will be the result
using Vim, I can now save and quit :wq
and I'm done
This is a straight process without any conflicts or anything in between that might happen sometimes
Comments (0)
You can clone a snippet to your computer for local editing. Learn more.