Can't see remote branch

后端 未结 2 946
一向
一向 2021-02-02 14:16

I\'m stil learning git and not sure how some basic things work. I created a local branch by doing:

git branch AppStore

I can\'t remember exactl

2条回答
  •  梦谈多话
    2021-02-02 14:38

    You need to publish your branch on your upstream repo, while tracking it locally (making sure your local branch keep in synch with that new remote branch: see "What is a tracking branch")

    git push --set-upstream origin AppStore
    

    As mentioned in the comments, the other developers need to fetch what has been pushed (included the new branch).
    A git fetch origin is one way, but if you are unsure of the name of the remote repo, a git remote update works just fine.

    That will update their remote branches, but won't create a local branch of the same name, as detailed in "Track all remote git branches as local branches".

提交回复
热议问题