1

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:

  1. about half a month I commit as below

    git commit -am "will create merge conflict 1"
    
  2. 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
    
  3. The output confuse me. In fact, it is just my old comment.

3
  • do you had deleted files or untracked files before reseting? Commented Jun 25, 2012 at 13:17
  • 3
    That output is correct: git is telling you you have reset to the last commit on HEAD and is showing the commit message as a reminder of where you are now. Commented Jun 25, 2012 at 13:21
  • Your question has no question in it. Please edit it to make it clear what your asking or it will get flagged. Right now it makes no sense. Like Josh said the output is all good. And your header makes even less sense because you have not provided any printings/output that would demonstrate any errors. If there is an error you should add that to your posting as well. Commented Nov 12, 2012 at 12:59

1 Answer 1

5

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.