I've got a branch for each bug/issue and it was getting a bit
unwieldy.  A little searching suggested this

  # archive off the BUG-123 branch
  git update-ref refs/closed/BUG-123 BUG-123
  git branch -D BUG-123

which seems to do exactly what I want -- branches are archived off so
they still have refs, but they don't appear in the output of "git
branch".

Reading up on "git help update-ref", it states that it updates the
name "safely".  As best I can tell, the above process does something
like

  cd .git/refs
  mkdir -p closed
  mv heads/BUG-123 closed

Is there something unsafe about this?  The advantage to the latter
would be that I could do a bunch of them easily:

  mv heads/BUG-{123,234,345,456,567} closed

but I want to make sure I'm not screwing something up unsafely.  Is
there some key element to "update-ref"'s safety that I'm missing?

-tkc



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to