From: Junio C Hamano <gitster@pobox.com>
To: Rustom Mody <rustompmody@gmail.com>
Cc: Sverre Rabbelier <srabbelier@gmail.com>, git@vger.kernel.org
Subject: Re: pulling git -- version confusion
Date: Mon, 09 Nov 2009 13:58:46 -0800 [thread overview]
Message-ID: <7vzl6vqs15.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <f46c52560911090524l51140858sdde29d76e2cfed49@mail.gmail.com> (Rustom Mody's message of "Mon\, 9 Nov 2009 18\:54\:52 +0530")
Rustom Mody <rustompmody@gmail.com> writes:
> On Mon, Nov 9, 2009 at 1:21 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
>> On Mon, Nov 9, 2009 at 08:45, Rustom Mody <rustompmody@gmail.com> 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
prev parent reply other threads:[~2009-11-09 21:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 6:14 pulling git -- version confusion Rustom Mody
2009-11-09 6:37 ` Sverre Rabbelier
2009-11-09 7:45 ` Rustom Mody
2009-11-09 7:51 ` Sverre Rabbelier
2009-11-09 13:24 ` Rustom Mody
2009-11-09 19:16 ` Sverre Rabbelier
2009-11-09 21:58 ` Junio C Hamano [this message]
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=7vzl6vqs15.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rustompmody@gmail.com \
--cc=srabbelier@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