{"thread":{"id":"33902","subject":"Remote branch can not be resolved as commit?","startedAt":"2013-05-22T14:29:14Z","lastAt":"2013-05-23T08:45:44Z","messageCount":2,"participants":["Kendall Shaw","Holger Hellmuth (IKS)"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"218187","messageId":"519CD63A.20802@kendallshaw.com","threadId":"33902","inReplyTo":null,"subject":"Remote branch can not be resolved as commit?","fromName":"Kendall Shaw","fromEmail":"kshaw@kendallshaw.com","sentAt":"2013-05-22T14:29:14Z","receivedAt":"2013-05-22T14:29:14Z","isPatch":false,"sender":{"key":"kshaw@kendallshaw.com","avatar":null},"body":"I am trying to setup a repository for use inside the LAN, but I have \nbeen unable to checkout any branch so far. I am very new to git.\n\nThe repository is being served from gitblit over https. I have \nGIT_SSL_NO_VERIFY=true. The repository was created from git svn.\n\ngit ls-remote\n\nshows the remote branches, e.g.:\n\n... refs/remotes/2.0.3\n... refs/remotes/trunk\n\ngit branch -r\n\nshows none of the remote branches.\n\ngit checkout -b new-2.0.3 origin/2.0.3\n\nproduces:\n\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'origin/2.0.3' which can not be resolved as \ncommit?\n\nWhat does that mean?\n\nI get the same result after each of these:\n\ngit fetch\n\ngit remote update\ngit fetch\n\ngit add remote stage-repo https://example.com:8443/git/blah-tools.git\ngit fetch stage-repo\ngit checkout -b new-2.0.3 stage-repo/2.0.3\n\nCan you explain what the error message means, and what I am doing wrong?\n\nKendall\n"},{"id":"218239","messageId":"519DD738.4050807@ira.uka.de","threadId":"33902","inReplyTo":"519CD63A.20802@kendallshaw.com","subject":"Re: Remote branch can not be resolved as commit?","fromName":"Holger Hellmuth (IKS)","fromEmail":"hellmuth@ira.uka.de","sentAt":"2013-05-23T08:45:44Z","receivedAt":"2013-05-23T08:45:44Z","isPatch":false,"sender":{"key":"hellmuth@ira.uka.de","avatar":null},"body":"Am 22.05.2013 16:29, schrieb Kendall Shaw:\n> I am trying to setup a repository for use inside the LAN, but I have\n> been unable to checkout any branch so far. I am very new to git.\n>\n> The repository is being served from gitblit over https. I have\n> GIT_SSL_NO_VERIFY=true. The repository was created from git svn.\n\n(Never heard of gitblit. Consider my post as first level support ;-)\n\nRemember that git is a distributed CVS, unlike svn. We are talking about \ntwo repositories, the local one you executed the commands from and the \none on the server.\n\n> git ls-remote\n>\n> shows the remote branches, e.g.:\n>\n> ... refs/remotes/2.0.3\n> ... refs/remotes/trunk\n\nI would have expected a listing of\n... refs/heads/2.0.3\n... refs/heads/trunk\n\nand also a mention of the remote repository (did you remove that before \nposting?).\n\nIn refs/remotes you usually find references/pointers to remote branches \nwhereas local branches are in refs/heads. So this looks like an empty \nrepository that was created and configured with a remote repository.\n\nEither your remote repository failed to get any contents or \"git \nls-remote\" lists your local (empty) repository, which is possible if you \nsomehow managed to configure your local repository as remote of itself.\n\nI would suggest the following:\n\n1) \"git ls-remote .\". If it shows the same listing as git \"ls-remote\", \nyou probably have configured your local repository as your remote\n\n2) \"git config --list\". Is \"remote.origin.url\" a link to the repository \non the server or is it \".\"?\n\n3) Can you log into the server? If yes, change to the repository there \nand try \"git log\" (are there any commits listed at all?), \"git branch -a \n-v\". If no commits and no local branches, blame git svn.\n\n> git branch -r\n>\n> shows none of the remote branches.\n>\n> git checkout -b new-2.0.3 origin/2.0.3\n>\n> produces:\n>\n> fatal: git checkout: updating paths is incompatible with switching\n> branches.\n> Did you intend to checkout 'origin/2.0.3' which can not be resolved as\n> commit?\n>\n> What does that mean?\n\nhttp://stackoverflow.com/questions/945654/git-checkout-on-a-remote-branch-does-not-work\n"}]}