git - branch alias?

前端 未结 3 1140
梦毁少年i
梦毁少年i 2020-12-14 14:11

I am researching switching from starteam to git.

Currently, in starteam, we use \"floating views\" with special names. These floating views basically work like alias

3条回答
  •  一个人的身影
    2020-12-14 14:56

    Please see here: https://stackoverflow.com/a/549949/606723

    You can rename the master branch trunk as Greg has suggested, or you can also create a trunk that is a symbolic reference to the master branch so that both git and svn users have the 'main' branch that they are used to.

    git symbolic-ref refs/heads/trunk refs/heads/master
    

    Note that trunk isn't a first class citizen. If you checkout trunk and perform a git status you will actually be on master, however you can use the trunk command in all places that you use the branch name (log, merge, etc.).

提交回复
热议问题