Re: Running 'git pull' from an unnamed branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :)

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]