When you run git status ,
git branch will be local dev
and remote branch that it is tracking compare ( origin/master
), because origin/master
not changed, it is still current dev
branch (and origin/dev
) back 1 commit / change, so there will be prompt.
We want to do is to change the local dev
branch to track the remote dev
branch.
Solution (choose one):
①, run
git branch --set-upstream-to=origin/dev
②, when the additional push to the push command:--set-upstream
git push origin dev --set-upstream
(Reprinted from JavaEar , the original quote and describe principles for a more detailed explanation of the problem, with address: https://www.javaear.com/question/45460281.html )