Automatic merge failed;fix conflicts andthencommit the result.
shell> git status
1
2
3
4
5
6
7
8
9
10
11
12
13
On branch eric-merge
Your branch isup todate with'origin/eric-merge'.
You have unmerged paths.
(fix conflicts andrun"git commit")
(use"git merge --abort"toabort the merge)
Changes tobe committed:
Unmerged paths:
(use"git add <file>..."tomark resolution)
both modified:myCode.pm
1
2
shell>git merge--abort
shell>git status
1
2
3
4
On branch eric-merge
Your branch isup todate with'origin/eric-merge'.
nothing tocommit,working tree clean
IMPORTANT NOTE: Previous versions of git used different commands for this operation: Latest version: git merge –abort Older than version 1.7.4: git reset –merge Older than version 1.6.2: git reset –hard
shell$ git log | head -1 commit a203e1bd04718bff10a3df4a3389c493c97c0432 Use the commit string as the last argument to the git revert command: shell$ git revert -m 1 a203e1bd04718bff10a3df4a3389c493c97c0432