Is it possible to alias a branch in Git?

后端 未结 3 925
面向向阳花
面向向阳花 2020-11-30 02:44

I am looking into using git on a massive scale. I was hoping to increase adoption and make things easier by calling the master branch trunk.

This can and will give

3条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 03:31

    There is nothing special about the name "master" in Git, it's just called that by convention (and by default). You can certainly call it "trunk" if you like:

    git branch -m master trunk
    

    This is very much like Subversion, where the name "trunk" is only called that by convention too. You could have called the main branch "master" in Subversion.

提交回复
热议问题