git branch help?
Kevin Kofler
kevin.kofler at chello.at
Tue Aug 3 07:12:48 UTC 2010
Oh, and I forgot:
Peter Hutterer wrote:
> it's likely that one you get used to git you'll be using branches heavily.
> And once you start using several branches interchangably, directories
> don't cut it anymore compared to git.
>
> one example: updating to a new version of the wacom driver was a matter of
> fedpkg clone xorg-x11-drv-wacom
> <update master branch>
> fedpkg commit && fedpkg push && fedpkg build
>
> fedpkg switch-branch f14
> git cherry-pick master
> fedpkg commit && fedpkg push && fedpkg build
>
> fedpkg switch-branch f13
> git cherry-pick master
> fedpkg commit && fedpkg push && fedpkg build
I don't see why I'd want to magically switch the branch of my directory to
do this.
This makes much more sense (assuming a fedpkg clone -B that actually works,
I don't know whether they already fixed that, and I guess you need to do
those extra git pull operations if you work that way due to git's ugly
design):
fedpkg clone -B xorg-x11-drv-wacom
cd xorg-x11-drv-wacom/master
<update master branch>
fedpkg commit && fedpkg push && fedpkg build
cd ../f14
git pull
git cherry-pick master
fedpkg commit && fedpkg push && fedpkg build
cd ../f13
git pull
git cherry-pick master
fedpkg commit && fedpkg push && fedpkg build
That way the contents of your directories always contain the same branch, so
you don't end up accidentally committing to the wrong one. But I guess git
will be storing a lot of redundant stuff and forcing extra pulls if you work
that way. :-(
Kevin Kofler
More information about the devel
mailing list