git status prompted Your branch is ahead of 'origin / master' by 1 commit. . .

When you run  git status ,git branch will be local devand remote branch that it is tracking compare ( origin/master), because origin/masternot changed, it is still current devbranch (and origin/dev) back 1 commit / change, so there will be prompt.

We want to do is to change the local devbranch to track the remote devbranch.

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 )

Guess you like

Origin www.cnblogs.com/woailiming/p/11444291.html