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

Re: Question regarding: git pull --no-commit origin

From
Jeff King <peff@peff.net>
Date
Mar 26, 2007, 01:47 UTC
Message-ID
<20070326014757.GA28592@coredump.intra.peff.net>
In-Reply-To
<93c3eada0703251816lc430e03l71ee2ffaa3d8796@mail.gmail.com>
On Mon, Mar 26, 2007 at 10:46:09AM +0930, Geoff Russell wrote:
Show 6 quoted lines
> If --no-commit won't let me do this then perhaps I need something like:
> 
>          git pull origin:testing
>          git checkout testing
>           .... test
>          git checkout master ; git pull . testing

Close. Remember that a pull is basically a fetch + merge; so your first command is just the fetch:

  # fetches everything from origin
  git fetch
  # see what they have that we don't
  git whatchanged HEAD..origin/testing
  # check out their code in more detail
  git checkout origin/testing
  # or even make our own branch in case we have tweaks to make
  git checkout -b testing origin/testing
  # and once we're OK, do the merge
  git checkout master; git merge origin/testing

All of that assumes git 1.5 or greater, which uses the separate remote layout and has some interface improvements. For older versions, their 'testing' branch will be pulled into your 'testing' branch, and I believe you will need to 'git pull . testing' to merge it.

-Peff
Previous: Geoff RussellNext: Geoff Russell
Message 4 of 5 in “Question regarding: git pull --no-commit origin”
  1. Geoff RussellMar 25, 2007
  2. Shawn O. PearceMar 25, 2007
  3. Geoff RussellMar 26, 2007
  4. Jeff KingMar 26, 2007
  5. Geoff RussellMar 26, 2007

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.