Reputation: 43
I am new to Git, I reverted all of my files so I have no pending changes but when I tried PULL command it showed below errors in output :
git pull
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.
git show HEAD:src/app/home/header.component.ts
git show HEAD:src/app/home/header.component.ts
Also I would be grateful, if you suggest some blogs that guide me improve my Git experience.
Upvotes: 1
Views: 4887
Reputation: 101
Sometime, it happens. You resolve the merging conflicts and but you find no file to stage. Again you pull, you will get same merging conflict. Then try these steps:
git merge --abort
that aborts the ongoing merging activitygit pull
before git push
git push
your changes. That's it.Upvotes: 0
Reputation: 53
Also I would be grateful, if you suggest some blogs that guide me improve my Git experience.
GitHub and CodeTree created a free "Try Git" tutorial that may be helpful.
Upvotes: 1
Reputation: 69
Git thinks that you previously attempted a merge which was not complete. That would occur if you had merge conflicts while attempting a merge. At that point, Git would have been waiting for you to fix your merge conflicts and continue the merge.
Since that never happened, Git is warning you that you are already in the middle of a merge and won't start a new one. You either need to clean up your current merge or abort your current merge before you can pull.
Normal Workflow:
git merge sample-branch
-- oops, conflict
-- fix <conflicted file>
git add <conflicted file>
git commit
The git commit will finish the merge that was in a conflicted state.
If you found you were not sure about what you wanted to merge you can get back to your pre-merge state by running: git merge --abort
You will also be able to verify that you are in the middle of a merge by running a git status
. You will see in the status a message about your current merge status.
Upvotes: 2
Reputation: 14449
Also I would be grateful, if you suggest some blogs that guide me improve my Git experience.
The git
TagInfo contains many links to good introductional git literature (especially this one).
Upvotes: 1
Reputation: 149
You have to commit. Like the log said.
If you were in merge state you have to finish the merge by commit before pull or push
Upvotes: 4