All of lore.kernel.org
 help / color / mirror / Atom feed
From: layer <layer@known.net>
To: git@vger.kernel.org
Subject: how to update origin/<branch> after a push to origin <branch>?
Date: Wed, 13 May 2009 21:42:15 -0700	[thread overview]
Message-ID: <19640.1242276135@relay.known.net> (raw)

I'm stumped on this one.

I'm in a repo and I push the master branch.  If I do

  git diff --name-only origin/master..master

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.

To make matters worse (!!), I made this attempt:

  $ git fetch origin master:origin/master
  From git:/repo/git/acl
   * [new branch]      master     -> origin/master
  $ git diff origin/master..master
  warning: refname 'origin/master' is ambiguous.
  $ 

Uh oh.

  $ git branch -a | grep origin/master
    origin/master
    origin/master
  $ find .git/refs -type f | grep origin
  .git/refs/heads/origin/master
  .git/refs/remotes/origin/acl81
  .git/refs/remotes/origin/HEAD
  .git/refs/remotes/origin/master
  $ cat .git/refs/heads/origin/master
  28f0f4f2cdf37640b94cdbd65406898222593f28
  $ cat .git/refs/remotes/origin/master
  4be7cc89d335421a93e4551b40bd06108a030221
  $ 


I'm going to leave my repo as is until a professionals helps me out,
lest I dig the hole deeper.

Thanks.

Kevin

             reply	other threads:[~2009-05-14  4:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14  4:42 layer [this message]
2009-05-14  4:58 ` how to update origin/<branch> after a push to origin <branch>? Avery Pennarun
2009-05-14  5:01   ` layer
2009-05-14  5:13   ` layer
2009-05-14  5:21   ` layer
2009-05-14  5:29     ` Avery Pennarun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19640.1242276135@relay.known.net \
    --to=layer@known.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.