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

Re: git merge remote branch says "Merge commit ..."?

From
Jeff King <peff@peff.net>
Date
May 22, 2009, 17:54 UTC
Message-ID
<20090522175401.GB11640@coredump.intra.peff.net>
In-Reply-To
<loom.20090522T172429-73@post.gmane.org>
On Fri, May 22, 2009 at 05:29:41PM +0000, Eric Raible wrote:
Show 15 quoted lines
> Jeff King <peff <at> peff.net> writes:
> 
> > I think doing a "git merge origin/master" is perfectly normal for some
> > workflows. For example:
> > 
> >   $ git fetch origin ;# grab it
> >   $ gitk origin/master...master ;# check if it is good to merge
> >   $ git merge origin/master ;# and merge it
> > 
> > The final step _could_ be a pull, but there is no point in repeating the
> > fetch (which might be costly).
> 
> My understanding is that if the objects already exist
> locally then this is not going to be costly at all.
> The negotiation of what is needed is cheap, isn't it?

No, it is not terribly expensive. But you do have to talk to the server, which may mean making an ssh connection, or the server may be overloaded and slow. So it can take a few seconds instead of a few microseconds.

There is actually another reason not to pull, though: you just inspected what is in origin/master, so that is what you are expecting to merge. If there is new stuff on the remote, you probably don't want to merge it without similarly inspecting it.

-Peff
Previous: Eric RaibleNext: Eric Raible
Message 4 of 10 in “git merge remote branch says "Merge commit ..."?”
  1. skillzero@gmail.comMay 21, 2009
  2. Jeff KingMay 22, 2009
  3. Eric RaibleMay 22, 2009
  4. Jeff KingMay 22, 2009
  5. Eric RaibleMay 22, 2009
  6. Jeff KingMay 22, 2009
  7. Johannes SixtMay 22, 2009
  8. Jeff KingMay 23, 2009
  9. Junio C HamanoMay 23, 2009
  10. Jeff KingMay 25, 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.