All of lore.kernel.org
 help / color / mirror / Atom feed
* pulling git -- version confusion
@ 2009-11-09  6:14 Rustom Mody
  2009-11-09  6:37 ` Sverre Rabbelier
  0 siblings, 1 reply; 7+ messages in thread
From: Rustom Mody @ 2009-11-09  6:14 UTC (permalink / raw)
  To: git

I did a git pull today

When I compile it
git  --version gives
git version 1.6.3.3.334.g916e1

Whereas latest stable shown on http://git-scm.com/
is 1.6.5.2.


Note:

git branch shows a star before master

git tag contains v1.6.5.2 as well as v1.6.3.3

When I checkout branch next
git version becomes  1.6.0.rc1.194.g9e4e

Can someone explain whats happening or am I missing something basic?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pulling git -- version confusion
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Sverre Rabbelier @ 2009-11-09  6:37 UTC (permalink / raw)
  To: Rustom Mody; +Cc: git

Heya,

On Mon, Nov 9, 2009 at 07:14, Rustom Mody <rustompmody@gmail.com> wrote:
> When I checkout branch next
> git version becomes  1.6.0.rc1.194.g9e4e

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

or:
$ git checkout next
$ git reset --hard origin/next

Followed by:
$ make
$ ./git --version

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pulling git -- version confusion
  2009-11-09  6:37 ` Sverre Rabbelier
@ 2009-11-09  7:45   ` Rustom Mody
  2009-11-09  7:51     ` Sverre Rabbelier
  0 siblings, 1 reply; 7+ messages in thread
From: Rustom Mody @ 2009-11-09  7:45 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: git

On Mon, Nov 9, 2009 at 12:07 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> Heya,
>
> On Mon, Nov 9, 2009 at 07:14, Rustom Mody <rustompmody@gmail.com> wrote:
>> When I checkout branch next
>> git version becomes  1.6.0.rc1.194.g9e4e
>
> Try either:
> $ git checkout master
> $ git reset --hard origin/master

Gives me
fatal: ambiguous argument 'origin/master': unknown revision or path
not in the working tree.
Use '--' to separate paths from revisions

>
> or:
> $ git checkout next
> $ git reset --hard origin/next

Likewise here
>
> Followed by:
> $ make
> $ ./git --version
>
> --
> Cheers,
>
> Sverre Rabbelier
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pulling git -- version confusion
  2009-11-09  7:45   ` Rustom Mody
@ 2009-11-09  7:51     ` Sverre Rabbelier
  2009-11-09 13:24       ` Rustom Mody
  0 siblings, 1 reply; 7+ messages in thread
From: Sverre Rabbelier @ 2009-11-09  7:51 UTC (permalink / raw)
  To: Rustom Mody; +Cc: git

Heya,

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

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pulling git -- version confusion
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Rustom Mody @ 2009-11-09 13:24 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: git

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

Also [I just tried this] if I make a fresh repo directly and then do a git pull
it gives a fatal: where do you want to fetch from

But with the git repo pull (seems to be) pulling all sorts of stuff
and not erroring out.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pulling git -- version confusion
  2009-11-09 13:24       ` Rustom Mody
@ 2009-11-09 19:16         ` Sverre Rabbelier
  2009-11-09 21:58         ` Junio C Hamano
  1 sibling, 0 replies; 7+ messages in thread
From: Sverre Rabbelier @ 2009-11-09 19:16 UTC (permalink / raw)
  To: Rustom Mody; +Cc: git

Heya,

On Mon, Nov 9, 2009 at 14:24, Rustom Mody <rustompmody@gmail.com> wrote:
> So theres no remote?
> But .git/remotes/origin has

Ick, how about switching to:
$ git remote add origin"git://git.kernel.org/pub/scm/git/git.git"

And then you can do what I said earlier?

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pulling git -- version confusion
  2009-11-09 13:24       ` Rustom Mody
  2009-11-09 19:16         ` Sverre Rabbelier
@ 2009-11-09 21:58         ` Junio C Hamano
  1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2009-11-09 21:58 UTC (permalink / raw)
  To: Rustom Mody; +Cc: Sverre Rabbelier, git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-09 21:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.