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.
Asked
Active
Viewed 37 times
2 Answers
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
- 21,300
- 18
- 66
- 89
-
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
- 3,221
- 3
- 27
- 43