Hi Alan
I just had a play with this.
So even if tags can be deleted, this is fine so long as nobody deletes them. So
I just tested to find that deleting a branch does not delete the tags on that
branch so the following sequence allows you to tag the head of a branch, delete
the branch then restore that branch.
git checkout -b deadend
//make some changes to the deadend branch
commit -a -m 'I made some changes'
git tag -a deadendHead -m 'head of the branch I will delete'
checkout master
git branch -D deadend
git tag
//this shows a list of all tags, you should find deadendHead there despite
having deleted deadend
git show deadendHead
//this will show, among other information the 40 character sha of the commit
the tag points to
//this can be used to check out this commit
git checkout 0123456789abcde0123456789abcde01234567
//you get a handy message telling you how to reinstate this branch
git checkout -b deadendResurrected
git log
//this shows you the commits proving that you are now in the resurrected branch
that you previously deleted
I hope you find that this is a suitable resurrection technique to allow you to
go ahead with whatever clean up you feel is needed. Fundamentally I don't think
there can ever be any foolproof method, but I think this comes as close as
possible. By the way when listing all tags they are in alphabetical order so it
would make sense to give all these head tags the same prefix so they are
grouped together.
Phil
________________________________
From: Alan W. Irwin <ir...@beluga.phys.uvic.ca>
To: Hazen Babcock <hbabc...@mac.com>
Cc: Plplot-devel mailing list <plplot-devel@lists.sourceforge.net>
Sent: Saturday, 16 August 2014, 19:03
Subject: Re: [Plplot-devel] Fwd: Re: [Plplot-core] git conversion status
On 2014-08-15 22:40-0700 Alan W. Irwin wrote:
> I do agree removal of all these weird (from the git point of view)
> branches is an excellent future goal so long as we have a fool-proof
> permanent way to resurrect those branches (even just for the purpose
> of understanding the early history of PLplot if someone becomes
> interested in that down the road).
>
> So is there such a method? For example, I asked before whether
> specially named tags (e.g., "historical_subversion_branch_test_cmake")
> constituted a permanent record that could be used as the basis of a
> fool-proof method of resurrecting all deleted subversion branches.
It turns out the answer to that git question is tags are not a
permanent record since they can be deleted (just had my first look at
"git help tag" after reading the Pro Git explanation of tags too
fast).
So maybe a file documenting the deleted branches sufficiently to be
able to resurrect them is the way to go?
Ideas from the git gurus, please.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel