Re: Pulling one commit at a time.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 23, 2009 at 12:48 PM, Sanjiv
Gupta<sanjiv.gupta@xxxxxxxxxxxxx> wrote:
> Hi,
> This is my first post here.
> 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.
>
> how to do that?
>
> In SVN, we can just do $ svn update -r next_rev_num
>

Git is a distributed system and handles branching much differently
than svn, so pull x+1 sounds like a funny request to git.

You could use `git fetch` to get the history from the remote
repository, then use `git log` or `gitk` to find the name of the
commit you're interested in, and use `git checkout` to switch to that
branch or `git merge` to merge the changes from the next commit into
your current branch.

Perhaps it would help if we knew why you only wanted to fetch one
commit at a time.

Adam
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]