When executing git pull
, it prompts that the current branch has no tracking information:
Git is very smart, and the following tips provide a solution:
The method is to first specify the local master or dev to the remote master or dev, and then go to pull ( it is recommended to use this , directly configure the tracking information):
//这是master
git branch --set-upstream-to=origin/master master
git pull
//下面是dev
git branch --set-upstream-to=origin/dev dev
git pull
Another method, for example, to operate the master, one is to directly specify the remote master:
git pull origin master
Choose a method and copy it to git
After that, follow-up operations can be performed
so that the prompt "There is no tracking information for the current branch" will no longer appear.