emacs-devel
[Top][All Lists]
Advanced

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

Re: Problem understanding git


From: dhruva
Subject: Re: Problem understanding git
Date: Fri, 23 May 2008 17:48:36 +0530

Hi,

On Fri, May 23, 2008 at 5:24 PM, Lynbech Christian
<address@hidden> wrote:
> On one machine, where I have git version 1.5.5.1, I just do a "git pull"
> and the updates comes pouring in, but when I try the same on my laptop
> where I only have git version 1.5.3.4, I get the following (to me)
> cryptic error message:
>
>        You asked me to pull without telling me which branch you
>        want to merge with, and 'branch.master.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.
>

In the .git folder, there is a file 'config'. Ideally, it should have
the following entry:
[branch "master"]
        remote = origin
        merge = refs/heads/master

- Type 'git branch' and you should see a branch named 'master'.
- If you do see, type 'git checkout master' to explicitly switch to
the master branch and do a git pull.
- If you do not see the master branch, type 'git branch -a', you
should see a bunch of 'origin/*' entries of which there will be
'origin/master'.
- If you find 'origin/master', create a local master as 'git branch
--track master origin/master'

I get a feeling that you might have tried to checkout from a non local
branch by doing 'git branch origin/master' or something unknowingly (i
had done it once). Changing to local master by 'git checkout master'
followed by a 'git pull' might work.

-dky

-- 
Contents reflect my personal views only!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]