[Bioperl-l] move ancient branches to attic

Chris Fields cjfields at illinois.edu
Fri May 14 19:23:31 UTC 2010


On May 14, 2010, at 1:38 PM, Robert Buels wrote:

> At the PDX hackathon last night, I was talking about this problem with a git expert, and he gave me a little tutorial on how git thinks about and keep branches and tags.
> 
> Each of these things is just a special case of a 'ref', which is just a reference to the end of some piece of the commit graph.  If you run
> 
>   git ls-remote http://github.com/bioperl/bioperl-live.git
> 
> you can see all the refs we currently have in our bioperl-live repo, which are all in either /refs/heads (which are our branches), or /refs/tags (our tags).
> 
> Now, it turns out you can have arbitrary things in here in addition to heads and tags.  I copied one of the old branches to /refs/archives/branch-ensembl-m1 to demonstrate this.  Now, it doesn't show up in normal workflow listings, but it's not deleted.  If somebody wanted to resurrect it, they could move or copy it into /refs/heads (where it would show up as as an active branch again).
> 
> To copy a branch into archives/,
> 
>  git push origin origin/<branch name>:refs/archives/<branch name>
> 
> To *move* a branch into archives/
> 
>  git push origin origin/<branch>:refs/archives/<branch> \
>                 :refs/heads/<branch>
> 
> The first part of that second part of that push has nothing on the left side of the colon, which pushes a 'null' to refs/heads/<branch>, which deletes it.  You can have an arbitrary number of these kinds of commands in each push invocation.
> 
> So, there's a good mechanism for archiving our old branches.
> 
> Rob

That's a nice alternative to an attic, and less visible.  

On a related note, going through, it appears the git conversion didn't track merges back to trunk.  For instance, I know the featann_rollback was merged to trunk but it's not showing up.  I know svn had poor merge-tracking prior to 1.5 (where svn:mergeinfo came into play), so it may be hard to actually find true merges w/o that.

chris



More information about the Bioperl-l mailing list