Tag Archives: Git pull Error

[Solved] Git pull error: You have not concluded your merge (MERGE_HEAD exists)

Error encountered while git pull:

localhost:~ lipengfei$ git pull
You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.

This error may be due to the previous pull down the code did not automatically merge git merge — abort fails, use the following method to solve the problem: save a copy of the local modification, pull the latest code from the online, cover the local code, and then recover the local modification

git fetch --all
git reset --hard origin/master
git pull

Git Pull Error: Please specify which branch you want to merge with.

$git pull

$ git pull
warning: no common commits
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
From github.com:nonfuxinyang/android-study
* [new branch] master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> master

Seeing the second tip, we now know a solution. That is to specify the link relationship between the current working directory, working branch, and remote warehouse and branch& lt; br>

For example, we set the master branch corresponding to the remote warehouse

git branch –set-upstream master origin/master

So every time we want to push or pull, we just need to input git push or git pull

Before that, we have to specify the remote branch that we want to push or pull

git push origin master

git pull origin master.

 

Git pull Error: “unable to update local ref”

When using git pull to pull the code, the latest code cannot be pulled, and the error “unable to update local ref” is reported.

In addition to re-clone a copy of the code, you can also use the following solutions:

1. Switch to the previous clone code directory and execute the command git gc –prune=now

2. Then execute the command git remote prune origin

3. Use git pull again