git pull报错:There is no tracking information for the current branch

 

Today, I found the time to git pull of error:

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> liwenduo/updateName

Because the local branch and remote branch not established contact (use git branch -vv can see the relationship of local branches and remote branches). Only need to execute the following command according to the command-line prompt

The name of the local branch git branch --set-upstream-to = origin / remote branch name
 This can be your local branch and remote branch linked.

Reference: https://www.cnblogs.com/zyjzz/p/7653378.html

Which also talked about the new branch is associated with remote branch locally, but I do not need to have a new branch

 

Branch git - the SET name of the local branch of -upstream-to = origin / remote branch name

Guess you like

Origin www.cnblogs.com/levontor/p/11323030.html
Recommended