Reputation: 15488
I went to push some files but got a merge error. I fixed it and went to merge again but got an error that I was no longer in the branch.
I went to switch back to the branch but couldn't; I got an error saying I still needed to merge my changes. Of course if I try to merge the changes I get an error saying I'm not in the right branch. Same if I try to stash.
Would anyone know how I can fix this? Or at least get back to my branch without needing to merge?
When I try to change Branches:
error: you need to resolve your current index first
filename.inc: needs merge
When I try to commit:
BUILD FAILED
You are not on the correct branch.
Git status:
# Changes to be committed:
#
# modified: styles.inc
# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: filename.inc
Upvotes: 3
Views: 503
Reputation: 6458
git diff filename.inc
to check if you did merge the file.git add filename.inc
to confirm this merge.git commit
to commit this merge.Upvotes: 2