Is it possible to alias a branch in Git?

Solution 1:

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.).

Solution 2:

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.