There is no tracking information for the current branch

后端 未结 13 2567
无人及你
无人及你 2020-11-27 23:59

I\'ve been using github from a relatively short period, and I\'ve always used the client to perform commits and pulls. I decided to try it from the git bash yesterday, and I

相关标签:
13条回答
  • 2020-11-28 00:53

    You could specify what branch you want to pull:

    git pull origin master
    

    Or you could set it up so that your local master branch tracks github master branch as an upstream:

    git branch --set-upstream-to=origin/master master
    git pull
    

    This branch tracking is set up for you automatically when you clone a repository (for the default branch only), but if you add a remote to an existing repository you have to set up the tracking yourself. Thankfully, the advice given by git makes that pretty easy to remember how to do.

    0 讨论(0)
提交回复
热议问题