Clone from a branch other than master

前端 未结 4 669
不思量自难忘°
不思量自难忘° 2021-01-30 03:20

I am trying to pull from a repository in Github. But I don\'t want to clone the master branch. I want to clone some other branch. When I try git clone ,

4条回答
  •  盖世英雄少女心
    2021-01-30 03:58

    If you already cloned the repo and want to contribute to the branch other than master, do this:

    $ git checkout --track origin/
    

    Of course, be sure to specify the right name of the remote (origin in the example above)

    This command will create a new local branch that will track a particular remote branch.

提交回复
热议问题