Hi Sebastian, On Mon, Jun 21, 2010 at 11:20 PM, Sebastian Harl <s...@tokkee.org> wrote: > Hi, > > On Sun, Jun 20, 2010 at 04:48:58PM +0200, Jerome Renard wrote: >> I added Marc's branch as a remote branch so I have this in my >> .git/config file : >> >> [...] >> [remote "octo"] >> url = git://github.com/octo/collectd.git >> fetch = +refs/heads/jr/varnish:refs/remotes/octo/jr/varnish >> [remote "mfournier"] >> url = http://github.com/mfournier/collectd.git >> fetch = +refs/heads/master:refs/remotes/mfournier/master >> [...] >> >> But whenever I run git merge mfournier/master <revnumber> git just merges >> everything (34 commits) and not only the one I want. Did I do something >> wrong ? > > The purpose of git-merge is to join two lines of history to form a new > commit that is supposed to represent the same state of the repository as > if *all* commits of the merged branches had happened in the current > branch. Branches are specified by their "head commit", i.e. the "tip" of > the requested branch. This may either be done using a name (e.g. > mfournier/master) or by specifying the SHA1 of the "head commit" (or > whatever else is supported by git-rev-parse ;-)). Also, git-merge allows > to specify more than one branch. This is, what you actually did: you > specified the branch "mfournier/master" and the branch, whose head > commit is "<revnumber>" and told git to merge those two into the current > branch. > > If you want to pick and apply a single commit only, use git-cherry-pick: > git cherry-pick <revnumber>. This will then apply the changes introduced > by <revnumber> on top of your current branch.
I had a look at git cherry-pick a few days ago and I read that since git cherry picks a single commit from another branch, that would break the commit history, this is why I did not date to use it actually. But if it is the only solution I'll use it for next times. Thanks :) -- Jérôme _______________________________________________ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd