Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: error: you need to resolve your current index first [duplicate]

Tags:

git

git-merge

I was trying to merge a branch with my branch, but had merge conflicts.

After seeing the conflicts, I've decided to revert my branch, but am unsure how to do so, as my usual approach of running the following doesnt seem to work to reset my branch

git fetch origin
git reset --hard origin/BRANCH

How can I do this?

like image 962
Brad Parks Avatar asked Jul 15 '19 16:07

Brad Parks


1 Answers

Found out you can abort your merge using:

$ git reset --merge

from this similar question/answer

like image 148
Brad Parks Avatar answered Sep 29 '22 02:09

Brad Parks