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

Re: how to update origin/<branch> after a push to origin <branch>?

From
Llayer <layer@known.net>
Date
May 14, 2009, 05:13 UTC
Message-ID
<20189.1242278012@relay.known.net>
In-Reply-To
<32541b130905132158s44cc5b19n974901c05cf025b2@mail.gmail.com>
Avery Pennarun <apenwarr@gmail.com> wrote:
Show 21 quoted lines
>> On Thu, May 14, 2009 at 12:42 AM, layer <layer@known.net> wrote:
>> > after the push, I still see the names of the files I pushed because I
>> > haven't updated origin/master yet, with a fetch.  Of course, a "git
>> > pull" would do it, but I don't want to do that, because I might be
>> > using something other than `origin' and I don't want anything but the
>> > single branch.
>> >
>> > So, I naively thought that
>> >
>> >  git fetch origin master
>> >
>> > would do the trick, but after that command the git diff above still
>> > shows the same files.
>> 
>> Short answer:
>> 
>>    git fetch origin
>> 
>> However, 'git push origin master' should update origin/master
>> automatically, at least in relatively recent git versions.  It's
>> rather weird if that didn't happen.
I decided to attempt cleanup myself:
  $ mv .git/refs/heads/origin/ git.refs.heads.origin
  $ git diff origin/master..master
  diff --git a/ChangeLog b/ChangeLog
  index f7b4551..f2200a0 100644
  --- a/ChangeLog
  +++ b/ChangeLog
  ...
OK, back to normal.
  $ git fetch origin
  From git:/repo/git/acl
     4be7cc8..28f0f4f  master     -> origin/master
  $ git diff origin/master..master
  $ 

I _swear_ I tried that. <sigh> Sorry to trouble everyone, and thanks Avery. Appreciated.

Kevin
Previous: layerNext: layer
Message 4 of 6 in “how to update origin/<branch> after a push to origin <branch>?”
  1. layerMay 14, 2009
  2. Avery PennarunMay 14, 2009
  3. layerMay 14, 2009
  4. layerMay 14, 2009
  5. layerMay 14, 2009
  6. Avery PennarunMay 14, 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.