From: Ross Boylan <ross@biostat.ucsf.edu>
To: Chris Packham <judge.packham@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: confused about remote branch management
Date: Wed, 23 Jul 2014 12:22:16 -0700 [thread overview]
Message-ID: <1406143336.29001.185.camel@localhost> (raw)
In-Reply-To: <53CF66D4.7060201@gmail.com>
I still don't know what I need to do to update origin/master in my local
repo.
Regarding Kevin's suggestion, I just tried "git fetch origin master".
It seems to have made no difference, at least judging by git show
origin/master. I'm assuming the commit it show is the head of the
branch.
For reasons given below, Chris's theory that there was a conflict also
doesn't seem to apply.
On Wed, 2014-07-23 at 19:40 +1200, Chris Packham wrote:
> On 23/07/14 14:49, Ross Boylan wrote:
> > My local master branch is the result of a merge of upstream master and
> > some local changes. I want to merge in more recent upstream work.
> > git pull doesn't seem to have updated origin/master, and git checkout
> > origin/master also doesn't seem to work.
> >
> > Here's some info that may be relevant.
> >
> >
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git remote -v
> > origin https://github.com/emacs-ess/ESS.git (fetch)
> > origin https://github.com/emacs-ess/ESS.git (push)
> > personal https://github.com/RossBoylan/ESS.git (fetch)
> > personal https://github.com/RossBoylan/ESS.git (push)
> > # I think I originally cloned from what is now the "personal" remote
> > # and switched names later so origin refers to upstream.
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git branch -v
> > * master 8fa569c [ahead 340] merge from origin
> > # 340 ahead of personal is plausible, but ahead from origin seems odd
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git --version
> > git version 1.7.10.4
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git branch -a
> > * master
> > remotes/origin/S+eldoc
> > remotes/origin/gretl
> > remotes/origin/linewise_callbacks
> > remotes/origin/litprog
> > remotes/origin/master
> > remotes/origin/transmissions
> > remotes/personal/HEAD -> personal/master
> > remotes/personal/S+eldoc
> > remotes/personal/gretl
> > remotes/personal/linewise_callbacks
> > remotes/personal/litprog
> > remotes/personal/master
> > remotes/personal/transmissions
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git status
> > # On branch master
> > # Your branch is ahead of 'personal/master' by 340 commits.
> > #
> > nothing to commit (working directory clean)
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git checkout origin/master
> > Note: checking out 'origin/master'.
> >
> > You are in 'detached HEAD' state. You can look around, make experimental
> > changes and commit them, and you can discard any commits you make in
> > this
> > state without impacting any branches by performing another checkout.
> >
> > If you want to create a new branch to retain commits you create, you may
> > do so (now or later) by using -b with the checkout command again.
> > Example:
> >
> > git checkout -b new_branch_name
> >
> > HEAD is now at a33a2f9... Merge branch 'trunk'
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git checkout master
> > Previous HEAD position was a33a2f9... Merge branch 'trunk'
> > Switched to branch 'master'
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git pull origin master
> > # [messages]
> > Not committing merge; use 'git commit' to complete the merge.
>
> I think this is the relevant message. By doing a git pull you are asking
> to merge the branch 'master' from the remote 'origin' into the current
> branch (which happens to also be called 'master').
>
> What I'm guessing is in "# [messages]" is something about a merge
> conflict that needs resolving before the merge can be completed. There
> are various ways to resolve the conflict but probably the easiest would be
Here are the full deleted messages:
remote: Counting objects: 388, done.
remote: Compressing objects: 100% (159/159), done.
remote: Total 356 (delta 257), reused 289 (delta 190)
Receiving objects: 100% (356/356), 59.99 KiB, done.
Resolving deltas: 100% (257/257), completed with 29 local objects.
From https://github.com/emacs-ess/ESS
* branch master -> FETCH_HEAD
error: Terminal is dumb, but EDITOR unset
Not committing merge; use 'git commit' to complete the merge.
So the lack of commit was not from a conflict, just it didn't know how
to bring up an editor (I was in a bash session under emacs).
[snip discussion of merging]
>
>
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git status
> > # On branch master
> > # Changes to be committed:
> > # [long list]
The list had only modified and added files; no conflicts.
Ross
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git show origin/master
> > commit a33a2f9e06185a225af7d72ea3896cfd260e455e
> > Merge: 136742f 6b22a88
> > Author: Vitalie Spinu <spinuvit@gmail.com>
> > Date: Mon Jan 20 00:43:30 2014 -0800
> >
> > Merge branch 'trunk'
> > # this was the head of origin/master BEFORE I did the pull.
> > # I think this means it has not been updated.
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git commit -m "merge in
> > upstream, probably fe7d609..8fa569c"
> > [master 59f6841] merge in upstream, probably fe7d609..8fa569c
> > ross@tempserver:~/UCSF/Choi/GitHub/ESS$ git show origin/master -v
> > # no change
next prev parent reply other threads:[~2014-07-23 19:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 2:49 confused about remote branch management Ross Boylan
2014-07-23 7:40 ` Chris Packham
2014-07-23 19:22 ` Ross Boylan [this message]
2014-07-23 21:41 ` Junio C Hamano
2014-07-23 23:30 ` Ross Boylan
2014-07-23 23:51 ` Junio C Hamano
2014-07-24 0:24 ` Ross Boylan
2014-07-23 13:30 ` Kevin
[not found] ` <CAO54GHBEexASvZcdJqDtgYkfecGbuZFLneC6Nr8u6CYfXuUPog@mail.gmail.com>
2014-07-23 18:54 ` Ross Boylan
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=1406143336.29001.185.camel@localhost \
--to=ross@biostat.ucsf.edu \
--cc=git@vger.kernel.org \
--cc=judge.packham@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).