[Biopython-dev] Merging branches
Bartek Wilczynski
bartek at rezolwenta.eu.org
Tue Apr 7 08:35:21 EDT 2009
Hi,
2009/4/6 Tiago Antão <tiagoantao at gmail.com>:
>> This means, that if you only need a part of what was committed as a
>> big changeset,
>> you will need to put an extra effort into selecting what you need.
>
> But how do you do that (other than manually copying files)?
I think that in this case you need to do this manually.
If you care only about one file, copying it is the easiest option.
> Cherry pick seems to be commit based...
In fact the whole git is commit based. It's not tracking files as
such, but blobs of data.
>I would like to replace this:
>http://github.com/tiagoantao/biopython-popgen-test/blob/fa5ebc23e7aaabce94ae594d9a4f83be9bf90215/Bio/PopGen/Stats/Simple.py
>With this:
>http://github.com/dalloliogm/biopython/blob/cbaf6249cb91ed505cb575f09c2eaef3809872b9/Bio/PopGen/Stats/Simple.py
>It would be cool not to loose the history relationship (I suppose that
>would be the good practice).
Indeed, keeping history is the right thing and it was one of the
reasons to switch to git.
It would be perfect if Giovanni could "redo" some of his commits and
split them into
smaller operations, so that cherry picking commits would be possible.
I know it's a pain...
> The point is: wanting to use part of a commit without loosing history.
> In my case, I dont want to import a test_PopGen_Fst file that Gio has.
> That being said, I dont think this is a big deal. I was just to
> preserve the history connectivity between repositiories. I think we
> can just use the old fashioned method of copying some files around.
> But it would be good to know if there is a "best practice" (which, I
> could not find out)
As far as I can tell, there is no way you could take only a part of a
commit. The best practice is to make smaller, atomic commits. It has
many advantages:
-it's easier to document a smaller change (I think it makes up for
potentially more work because of more commits)
-you can then "undo" small locally committed changes before pushing
them to public repo
-cherry picking of nicely documented small changes is an easy job
In this particular case of changes in tests, I think really changes to
one test should be committed separately from changes in other tests.
cheers
Bartek
More information about the Biopython-dev
mailing list