Can I map local branches to remote branches with different prefixes in git?

前端 未结 4 863
我寻月下人不归
我寻月下人不归 2021-02-13 19:01

We\'re working with a semi-centralized git repository here where I work. Each developer has their own subtree in the central git repository, so it looks something like this:

4条回答
  •  孤街浪徒
    2021-02-13 19:16

    In your [remote "origin"] section, add one line per mapping. Including master to master.

    push = refs/heads/master:master
    push = refs/heads/topic/feature:michael/feature
    

    I'm not sure how to do it with the git-config command.

    Be aware that from now on, all branches are pushed at the same when you do a straight git push (with no params).

    Would you care to explain why you don't keep the same branch names locally and remotely?

提交回复
热议问题