I usually rebase
when I pull in changes from my teammates, and often time I have conflicts:
...
CONFLICT (content): Merge conflict in app/views/sear
So after opening each file with a conflict, fixing it then committing the fixed files...
The problem is that you aren't supposed to commit
the fixes. If a.txt
has a merge conflict, then your shell log should look like:
$ vim a.txt # fix conflict
$ git add a.txt
$ # no commit between add and rebase!
$ git rebase --continue
Calling git rebase --continue
will take care of the commit itself.
I'm not sure how to "get back" to before your commit, when you're in the middle of a rebase. git reset --hard HEAD
would probably do the trick, but personally I'd feel safer just going straight to git rebase --abort
and starting over without committing in the middle.