Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: Running 'git pull' from an unnamed branch

From: Markus Heidelberg <hidden>
Date: 2016-06-15 22:46:34

Björn Steinbrink, 06.04.2009:
Maybe:
You asked me to pull without telling me which branch you want to merge
with and as you have no branch checked out, I cannot look for any
defaults to use.
Hmm, let's prove this.
Please name which branch you want to merge on the
command line and try again
Set the config options:

    $ git config branch..remote origin
    $ git config branch..merge refs/heads/master

Verify them:

    $ git config branch..remote
    origin
    $ git config branch..merge
    refs/heads/master

Fine, the unnamed branch is set up properly for git-pull.
It _has_ to work.

    $ git checkout origin/master~1
    Note: moving to "origin/master" which isn't a local branch
    If you want to create a new branch from this checkout, 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 fbdc056... Merge branch 'jc/name-branch'

Never mind. I can ignore this message, I don't need a real branch.
git-pull will work, since I set up defaults for the unnamed branch
properly.

    $ git pull
    You asked me to pull without telling me which branch you
    want to merge with, and 'branch..merge' in
    your configuration file does not tell me either.  Please
    name which branch you want to merge on the command line and
    try again (e.g. 'git pull <repository> <refspec>').
    See git-pull(1) for details on the refspec.
    
    If you often merge with the same branch, you may want to
    configure the following variables in your configuration
    file:
    
        branch..remote = <nickname>
        branch..merge = <remote-ref>
        remote.<nickname>.url = <url>
        remote.<nickname>.fetch = <refspec>
    
    See git-config(1) for details.

Hey, above I've made sure, that branch..remote and branch..merge were
set up properly.

Damn :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help