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.

 

Similar Posts: