0

I have pull the branch from remote to local.It's need to merge all conflict file.But I do not want to fix conflict and want to rollback my last commits to get my workflow back.If you have any idea for that please give me.

kaykay
  • 23
  • 7

2 Answers2

0

You can use git reset --hard to reset your branch to a known commit. If I understand you correctly, you can use git reset --hard HEAD~1 to reverse changes by merge. If you want to reset to a particular commit, you can use git log to see commits and their hashes, then reset to the particular commit using git reset --hard COMMIT_HASH.

For more detailed explanation, I advice you to follow the Atlassian tutorial.

P.S: Hard resetting will discard any uncommitted changed without warning, please stash or commit them, if they are important.

Shubham
  • 16,795
  • 17
  • 56
  • 84
  • I have using git reset function .I run that git reset --hard COMMIT_HASH.Thank you very much Shubham. – kaykay Jun 30 '15 at 10:08
0

If you have not finished the merge (with git commit), you can abort the merge with git merge --abort.

morxa
  • 2,546
  • 1
  • 19
  • 37