git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Holger Hellmuth (IKS)" <hellmuth@ira.uka.de>
To: Kendall Shaw <kshaw@kendallshaw.com>
Cc: git@vger.kernel.org
Subject: Re: Remote branch can not be resolved as commit?
Date: Thu, 23 May 2013 10:45:44 +0200	[thread overview]
Message-ID: <519DD738.4050807@ira.uka.de> (raw)
In-Reply-To: <519CD63A.20802@kendallshaw.com>

Am 22.05.2013 16:29, schrieb Kendall Shaw:
> I am trying to setup a repository for use inside the LAN, but I have
> been unable to checkout any branch so far. I am very new to git.
>
> The repository is being served from gitblit over https. I have
> GIT_SSL_NO_VERIFY=true. The repository was created from git svn.

(Never heard of gitblit. Consider my post as first level support ;-)

Remember that git is a distributed CVS, unlike svn. We are talking about 
two repositories, the local one you executed the commands from and the 
one on the server.

> git ls-remote
>
> shows the remote branches, e.g.:
>
> ... refs/remotes/2.0.3
> ... refs/remotes/trunk

I would have expected a listing of
... refs/heads/2.0.3
... refs/heads/trunk

and also a mention of the remote repository (did you remove that before 
posting?).

In refs/remotes you usually find references/pointers to remote branches 
whereas local branches are in refs/heads. So this looks like an empty 
repository that was created and configured with a remote repository.

Either your remote repository failed to get any contents or "git 
ls-remote" lists your local (empty) repository, which is possible if you 
somehow managed to configure your local repository as remote of itself.

I would suggest the following:

1) "git ls-remote .". If it shows the same listing as git "ls-remote", 
you probably have configured your local repository as your remote

2) "git config --list". Is "remote.origin.url" a link to the repository 
on the server or is it "."?

3) Can you log into the server? If yes, change to the repository there 
and try "git log" (are there any commits listed at all?), "git branch -a 
-v". If no commits and no local branches, blame git svn.

> git branch -r
>
> shows none of the remote branches.
>
> git checkout -b new-2.0.3 origin/2.0.3
>
> produces:
>
> fatal: git checkout: updating paths is incompatible with switching
> branches.
> Did you intend to checkout 'origin/2.0.3' which can not be resolved as
> commit?
>
> What does that mean?

http://stackoverflow.com/questions/945654/git-checkout-on-a-remote-branch-does-not-work

      reply	other threads:[~2013-05-23  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 14:29 Remote branch can not be resolved as commit? Kendall Shaw
2013-05-23  8:45 ` Holger Hellmuth (IKS) [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=519DD738.4050807@ira.uka.de \
    --to=hellmuth@ira.uka.de \
    --cc=git@vger.kernel.org \
    --cc=kshaw@kendallshaw.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;
as well as URLs for NNTP newsgroup(s).