Re: pulling git -- version confusion

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

 



Rustom Mody <rustompmody@xxxxxxxxx> writes:

> On Mon, Nov 9, 2009 at 1:21 PM, Sverre Rabbelier <srabbelier@xxxxxxxxx> wrote:
>> On Mon, Nov 9, 2009 at 08:45, Rustom Mody <rustompmody@xxxxxxxxx> wrote:
>>> Gives me
>>> fatal: ambiguous argument 'origin/master': unknown revision or path
>>> not in the working tree.
>>> Use '--' to separate paths from revisions
>>
>> Well, as what remote do you have upstream configured?
>>
>> What is the output of
>> $ git config -l
>
> gives me
>
> core.safecrlf=true
> user.email=<my email>
> user.name=<my name>
> core.repositoryformatversion=0
> core.filemode=true
> gui.geometry=885x450+0+27 207 192
>
> So theres no remote?
> But .git/remotes/origin has
>
> URL: git://git.kernel.org/pub/scm/git/git.git
> Pull: refs/heads/master:refs/heads/origin
> Pull: refs/heads/maint:refs/heads/maint
> Pull: refs/heads/next:refs/heads/next
> Pull: refs/heads/html:refs/heads/html
> Pull: refs/heads/pu:refs/heads/pu
> Pull: refs/heads/todo:refs/heads/todo
> Pull: refs/heads/man:refs/heads/man

That's a layout that was default before 1.5.0, I think.  3 years is an eon
in git timescale.

People giving advice based on modern git experience would say things like
"origin/master", but in your layout that ref that keeps track of where the
'master' branch at the remote repository is is not called 'origin/master',
but simply 'origin'.

So instead of

> Try either:
> $ git checkout master
> $ git reset --hard origin/master

that Sverre gave you, in your repository you would do:

    $ git checkout master
    $ git reset --hard origin

--
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]