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

Re: pull/merge --no-commit

From
KGKevin Green <kevin.t.green@morganstanley.com>
Date
Jun 7, 2007, 18:59 UTC
Message-ID
<20070607185918.GJ25093@menevado.ms.com>
In-Reply-To
<46684EFD.1080804@alcatel-lucent.com>
On 06/07/07 14:31:25, kurt_p_lloyd wrote:
Show 18 quoted lines
> Junio C Hamano wrote:
> >
> >
> > In this case, because you do not have anything new to add to the
> > history (remember, git history is a global DAG -- you and the
> > other repository are building it by pushing and pulling), we
> > move your HEAD to H (the tip of the branch you are pulling).
> > There is no need to create a new merge commit, with or without
> > the --no-commit option.  This is called "fast forward".
> 
> Except here's the model that I am trying to follow....
> It seems that 'pull' can be partitioned into 3 separate responsibilities:
> 
>   1. Retrieve changes from the remote user's replica (without modifying
>      any /local/ branches).
>   2. Bring changes from "remote" into a local branch (without commit).
>   3. Commit.
> 
I'm new to git and trying to pick it up and learn this week!! :)
I think what you want is:

$ git fetch $ git merge origin/master

You want to fetch the remote changes into a separate branch and then probably check the log to see what's changed... Once you're happy, merge the branches. Git will still fast-forward because you haven't made any local changes.

--Kevin
Previous: Junio C HamanoNext: Keith Duthie
Message 6 of 10 in “pull/merge --no-commit”
  1. kurt_p_lloydJun 7, 2007
  2. kurt_p_lloydJun 7, 2007
  3. Junio C HamanoJun 7, 2007
  4. kurt_p_lloydJun 7, 2007
  5. Junio C HamanoJun 7, 2007
  6. Kevin GreenJun 7, 2007
  7. Keith DuthieJun 7, 2007
  8. kurt_p_lloydJun 7, 2007
  9. J. Bruce FieldsJun 7, 2007
  10. Keith DuthieJun 7, 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.