6

For some reason whenever I go to my command line this is what I see next to my cwd:

enter image description here

I few days back I got an error message that said I had a merge conflict. I didn't know what this meant so I stopped trying to commit. Now whenever I go onto the git terminal I see (master|MERGING). And whenever I try to commit (even when it's not on the same remote) I get a lengthy error:

enter image description here

It says to fix the error but I'm not sure how to go about that. What exactly do I need to do?

user2030677
  • 3,448
  • 4
  • 23
  • 36
  • See also [How do I fix merge conflicts in Git?](http://stackoverflow.com/q/161813/456814). –  May 25 '14 at 19:52
  • See also [Pro Git: 3.2 Git Branching - Basic Branching and Merging - Basic Merge Conflicts](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts). –  May 25 '14 at 19:53
  • you have merge conflicts needs resolving prior to merge, look at this answer http://stackoverflow.com/a/35020326/4356754 – Mohamed Ali May 06 '16 at 02:29

1 Answers1

-7

Try running git reset --merge or git merge --abort (they are equivalent)

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • When I did `git reset --merge` it said `Deletion of directory gitproject failed. Should I try again? (y/n)` – user2030677 May 25 '14 at 19:40
  • @user2030677 - Can you give output of `git status`? – manojlds May 25 '14 at 19:40
  • @user2030677 did you try `git merge --abort`? –  May 25 '14 at 19:43
  • 1
    OP, please consider that these commands will undo any changes you might have done to the files since the merge conflict error appeared. – Marco Leogrande May 25 '14 at 19:44
  • @manojlds `git status` shows me a whole bunch of directories and files that aren't even in `gitproject`.. – user2030677 May 25 '14 at 19:46
  • @Cupcake I didn't try that yet. – user2030677 May 25 '14 at 19:48
  • @manojlds Actually, `git status` shows me untracked files both in and outside `gitproject`. – user2030677 May 25 '14 at 19:52
  • 7
    -1 (for now): an answer that destructively removes any of the OP's data without any warning is a worse answer than "turn off your computer and you won't get any more messages". I understand that the OP is working in a newly created repository. Others reading this may not. –  May 25 '14 at 20:21
  • 1
    @hvd to be fair, the OP already screwed himself over when he failed to resolve a merge in the middle of conflicts because he didn't understand what merge conflicts are. –  May 25 '14 at 20:38