After Git clone from GitHub, I do not see my branch

后端 未结 3 1417
眼角桃花
眼角桃花 2021-01-29 21:28

I have a repository on GitHub. It contains master and one branch.

When I clone it, I obtain only master and do not see my branch.

Why i

3条回答
  •  不要未来只要你来
    2021-01-29 21:54

    You can directly do:

    git checkout 
    

    This automatically creates a local branch which tracks the remote branch with the same name. Do this always after cloning, if you want to work on a particular branch other than master.

    Note: When you clone the remote name is by default 'origin' which is different from the remote name used in other machines where you are developing. So, you can initially name your remote before cloning or push to origin ever after.

提交回复
热议问题