From: Sanjiv Gupta <sanjiv.gupta@microchip.com>
To: Nanako Shiraishi <nanako3@lavabit.com>
Cc: git@vger.kernel.org
Subject: Re: Pulling one commit at a time.
Date: Mon, 24 Aug 2009 11:52:07 +0530 [thread overview]
Message-ID: <4A92318F.6050105@microchip.com> (raw)
In-Reply-To: <20090824060710.6117@nanako3.lavabit.com>
Nanako Shiraishi wrote:
> Quoting Sanjiv Gupta <sanjiv.gupta@microchip.com>
>
>
>> I just wanted to know how can I pull one commit at a time from public
>> repository.
>> e.g.
>> when I first cloned from the public repo, it was at X. now it has
>> reached Y. I just want to pull x+1.
>>
>
> When your histories look like this:
>
> A your 'master'
> /
> ---X---U---V---W---Y public 'master' (your 'origin')
>
> instead of creating a single merge like this with "git pull":
>
> A---------------M your 'master' (fully merges 'origin')
> / /
> ---X---U---V---W---Y public 'master'
>
> you want to create a history like this?
>
> A---J your 'master' (lacks V, W and Y)
> / /
> ---X---U---V---W---Y public 'master'
>
> For that, you can fetch first.
>
> git fetch origin
>
> Then look at the history in gitk
>
> gitk master origin
>
> And find the commit you are interested in merging (U in the above picture). And merge it.
>
> git merge origin~3
>
> Replace "origin~3" in the example above with whatever commit you want to merge the entire history leading to it.
>
> You can repeat this final step as many times you want. For example, if you want create a history like this:
>
> A---J---K---L---M your 'master'
> / / / / /
> ---X---U---V---W---Y public 'master'
>
> you can do so by repeating the last step for V, W and Y in turn.
>
> In general the public history isn't necessarily a single straight line like this picture and it doesn't make sense to merge one at a time for all the commits on the public branch, but if that is what you really want to do, you can do so.
>
>
Excellent description. Thanks for that. I want to merge commits one by
one because I want to run a regression suite on each commit and
therefore know if any one is causing failures.
- Sanjiv
next prev parent reply other threads:[~2009-08-24 6:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <F536B7C316F9474E9F7091239725AC9A02FA7F44@CHN-CL-MAIL01.mchp-main.com>
2009-08-23 16:48 ` Pulling one commit at a time Sanjiv Gupta
2009-08-23 20:11 ` Alex Riesen
2009-08-23 20:17 ` Adam Brewster
2009-08-23 20:19 ` Sam Vilain
2009-08-23 21:07 ` Nanako Shiraishi
2009-08-23 22:33 ` Junio C Hamano
2009-08-24 6:22 ` Sanjiv Gupta [this message]
2009-08-24 7:46 ` Kai Blin
2009-08-24 7:55 ` Sanjiv Gupta
2009-08-24 8:20 ` Sean Estabrooks
2009-08-24 8:20 ` Erik Faye-Lund
2009-08-24 8:22 ` Erik Faye-Lund
2009-08-24 8:28 ` Matthieu Moy
2009-08-24 8:33 ` skillzero
2009-08-24 8:41 ` Matthieu Moy
2009-08-24 10:22 ` David Aguilar
2009-08-24 10:49 ` Sanjiv Gupta
2009-08-24 11:07 ` Matthieu Moy
2009-08-24 18:19 ` Avery Pennarun
2009-08-24 19:08 ` Sanjiv Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A92318F.6050105@microchip.com \
--to=sanjiv.gupta@microchip.com \
--cc=git@vger.kernel.org \
--cc=nanako3@lavabit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.