Git Empty Branches

Found out some interesting Git Hints presented as webcasts at the site below. The most interesting part was to learn how to create empty branches on it, so a project can be functionally separated without having to kludge your working dir with several directories.

GitCasts: Empty Branches

Summarizing the lesson:

$ git-symbolic-ref HEAD refs/heads/emptybranch
$ git-rm --cached -r .
$ git-commit --allow-empty -m "Initial commit for empty branch"

The library versus website example was perfect, but one can think about other relevant situations, like sub-projects inside a bigger project, management documentation or even meta-files configuring the repository itself (description and ACL).

Tags: , ,

Leave a comment