Why do I need to do `--set-upstream` all the time?

后端 未结 21 2276
南方客
南方客 2020-11-22 09:15

I create a new branch in Git:

git branch my_branch

Push it:

git push origin my_branch

Now say someone mad

21条回答
  •  野性不改
    2020-11-22 09:37

    You can also explicitly tell git pull what remote branch to pull (as it mentions in the error message):

    git pull

    Be careful with this, however: if you are on a different branch and do an explicit pull, the refspec you pull will be merged into the branch you're on!

提交回复
热议问题