martonsz
2/16/2015 - 12:23 PM

Merge (squash) git commit

Merge (squash) git commit

Run rebase in interactive mode:

Rebase three steps back

git rebase -i HEAD~3

Mark commits you want to merge with 'squash'

commit 2 and 3 will be merged into commit 1

 pick fda59df commit 1
 squash x536897 commit 2
 squash c01a668 commit 3