How can I merge 2 commits into 1
- by michael
Hi,
I am trying to merge 2 commits into 1. So I follow this:
http://www.gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
I did
$ git rebase --interactive HEAD~2
It opens an editor
I change 'pick' to 'squash'
Save the editor
But i get 'Cannot 'squash' without a previous commit'
so what can I do to recover?
When I do ' git rebase --interactive HEAD~2
Interactive rebase already started'
When I do '$ git rebase --continue
Cannot 'squash' without a previous commit'
Thank you.