Track all remote git branches as local branches

前端 未结 15 2341
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 09:01

Tracking a single remote branch as a local branch is straightforward enough.

$ git checkout --track -b ${branch_name} origin/${branch_name}
<
15条回答
  •  爱一瞬间的悲伤
    2020-11-22 09:34

    without any scripting (in an empty directory):

    $ git clone --bare repo_url .git
    $ git config core.bare false
    $ git checkout
    

    after that, all remote branches will be seen as local.


    original (in russian).

提交回复
热议问题