Reputation: 2053
I am git newbie. When I hope to reset hard to discard all local modification, git return merge conflict
HEAD is now at 3291a25 will create merge conflict 1
my operation:
about half a month I commit as below
git commit -am "will create merge conflict 1"
today I hope to reset --hard to this ref
yaoyangyong@ubuntulucky:~/repos01$ git reset --hard HEAD
HEAD is now at 3291a25 will create merge confict 1
The output confuse me. In fact, it is just my old comment.
Upvotes: 1
Views: 2075
Reputation: 72745
git is simply telling you the result of the reset.
HEAD(your current position) is now at 3291a25(the commit you wanted to reset to) "will create merge confict 1"(the message of the commit).
You should pass a commit which you want to reset to rather than just say HEAD
. Also, if you want to abort a half completed merge, use git merge --abort
(or git reset --merge
in older versions of git).
Upvotes: 5