[Biopython-dev] WARNING - I've just been rewriting history

Peter biopython at maubp.freeserve.co.uk
Tue Jul 27 06:28:29 EDT 2010


Hi all,

If anyone has been trying to use the git repository in the last 12 hours or so,
please note I have just re-written recent history. If in any doubt, do a fresh
clone. According the github network no one else has committed anything
recently, which is good.

Re-writing history in git is possible but is generally considered a "bad thing"
because someone might have already taken and worked from the "erased"
changes. Hopefully I got away with it without messing anyone up...

What I did and why: One of our team made a bad merge, and pushed it to
the master. If this had been spotted BEFORE being made public a local
revert could have been done. The standard procedure here is to do a
merge revert, but unfortunately it seems they reverted to the wrong branch
(merge reverts can be done back to either of the two parents). At this point
we had two unwanted commits, and the best way to fix this wasn't clear
[at least not to us - has anyone got advice here for future reference?].

I took the (rash?) choice first thing this morning to take a new branch
from just before the bad merge, and then via a few renames made that
the new master branch, and deleted the problematic branch. The git
history is now "clean", but has been changed.

*** To repeat - if anyone did a git pull in the last 12 hours or so, please
discard those changes and take a fresh clone. ***

As a general warning, please think twice before any merge. Then check
twice before pushing to github. I don't want to point fingers or spread
blame around - we're all still learning git. I'm guilty of unnecessary merges
this too - most recently 17 July, a brief fork and merge of two versions
of the master branch, where with hindsight a "git rebase origin master"
would have been wise before that commit.

If you are not confident about merging branches, perhaps sending a
merge pull request might be safer - get someone else to go it ;)
Would anyone other than me feel happy handling merge requests?

Regards,

Peter


More information about the Biopython-dev mailing list