LogIn
I don't have account.

Getting Error : Pull is not possible because you have unmerged files

When i am trying to take pull on my branch. i am getting error Pull is not possible because you have unmerged files
could any one assist in resolving this issue?

Please pay attention to update your answer.

Update Your Answer care fully. After saving you can not recover your old answer

Carefully Update Your Answer!!

Git cannot perform pull operations if merge conflicts are addressed in your branch. 

Pull is not possible because you have unmerged files  i.e. there are conflicts from a previous merge attempt that have not yet been resolved. to resolve this first you need to resolve the merge conflict and commit your changes after that take the pull.

  1. Check the Current Status 

    You will see a list of files that are unmerged and causing conflicts.

    git status
  2.  Open and Resolve Conflicts
  3. Stage the Resolved files

    git add .
  4. Commit the merge

    git commit
  5. Now can take pull

    git pull

Please pay attention to update your answer.

Update Your Answer care fully. After saving you can not recover your old answer

Carefully Update Your Answer!!

Abort the merge and pull fresh

If you don’t need the current changes or are okay to reapply them later:

git merge --abort     # cancel the ongoing merge
git stash             # temporarily save your local changes
git pull              # get latest changes from remote
git stash pop         # reapply your saved changes

Safest way if you just want a clean pull without losing your work.

Please pay attention to update your answer.

Update Your Answer care fully. After saving you can not recover your old answer

Carefully Update Your Answer!!

Discard local changes completely

If you don’t care about local edits and just want the remote version:

git reset --hard HEAD
git pull

 This will erase all uncommitted local changes , use only if you’re sure.

Please pay attention to update your answer.

Update Your Answer care fully. After saving you can not recover your old answer

Carefully Update Your Answer!!

Commit first, then pull

If you have local changes that you want to keep:

git add .
git commit -m "Saving my local changes"
git pull --rebase

This replays your local commits on top of the latest remote branch, avoiding messy merges.