I have always assumed that the .git/branches directory is for legacy purposes and that git used to use that directory, but now uses the .git/refs directory instead. Is this true? If not, then what is the purpose of that directory since I have never seen it used or referenced.
EDIT
I’m using git version 1.7.3.4.
The now “slightly deprecated” use of
.git/branchesis described in the usefulgitrepository-layoutdocumentation:In the comments above, the question was raise of why some people have this directory and some don’t. It seems that a commit was introduced in 2009 that stopped git from creating the
.git/branchesdirectory by default. However, more recently that change was reverted (i.e. meaning that the.git/brancheswill be created ongit init, etc.), with the following justification from Junio C. Hamano: