git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Pulling one commit at a time.

From
Adam Brewster <adambrewster@gmail.com>
Date
Aug 23, 2009, 20:17 UTC
Message-ID
<c376da900908231317j58e31f78l85bf9132d5bd0e1e@mail.gmail.com>
In-Reply-To
<4A9172D0.6030507@microchip.com>

On Sun, Aug 23, 2009 at 12:48 PM, Sanjiv Gupta<sanjiv.gupta@microchip.com> wrote:

Show 12 quoted lines
> 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
Previous: Alex RiesenNext: Sam Vilain
Message 3 of 20 in “Pulling one commit at a time.”
  1. Sanjiv GuptaAug 23, 2009
  2. Alex RiesenAug 23, 2009
  3. Adam BrewsterAug 23, 2009
  4. Sam VilainAug 23, 2009
  5. Nanako ShiraishiAug 23, 2009
  6. Junio C HamanoAug 23, 2009
  7. Sanjiv GuptaAug 24, 2009
  8. Kai BlinAug 24, 2009
  9. Sanjiv GuptaAug 24, 2009
  10. Sean EstabrooksAug 24, 2009
  11. Erik Faye-LundAug 24, 2009
  12. Erik Faye-LundAug 24, 2009
  13. Matthieu MoyAug 24, 2009
  14. skillzero@gmail.comAug 24, 2009
  15. Matthieu MoyAug 24, 2009
  16. David AguilarAug 24, 2009
  17. Sanjiv GuptaAug 24, 2009
  18. Matthieu MoyAug 24, 2009
  19. Avery PennarunAug 24, 2009
  20. Sanjiv GuptaAug 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.