2011-07-19

Switching the active branch in a bare git repository

If you ever need to delete the "active" branch in a git repository, you need to first switch the active branch. Because you cannot delete the branch you are sitting on... You cannot checkout a branch, as you would usually do. You have to change the symbolic reference called HEAD. You can do this with the symbolic-ref command: