I'm using Git 1.7.4.1 on Mac 10.6.6. I'm trying to check out the latest version of our project into an empty directory I have locally. But this is failing ...
davea-mbp2:workspace-sts-2.6.0.SR1 davea$ mkdir systems
davea-mbp2:workspace-sts-2.6.0.SR1 davea$ cd systems/
davea-mbp2:systems davea$ git clone http://dalvarado@mdomain.com/systems.git
Cloning into systems...
Password:
remote: Counting objects: 1710, done.
remote: Compressing objects: 100% (863/863), done.
remote: Total 1710 (delta 627), reused 592 (delta 260)
Receiving objects: 100% (1710/1710), 30.64 MiB | 6.41 MiB/s, done.
Resolving deltas: 100% (627/627), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout
After this there is nothing checked out from the remote repo. I've confirmed the URL and my credential开发者_开发技巧s are correct. What is the correct way to checkout from a git repo? - Dave
You have a clone. You have no checkouts. git branch or git tag might suggest some possible things to checkout.
Running clone gets you a complete copy of the upstream repo. By default, the command then checks out the remote HEAD. If, as in this case, the remote HEAD doesn't point to anything, then nothing gets checked out.
What you have done is the correct way to clone and checkout a normal repo. Unfortunately, your target is unusual. Someone will have to tell you what branch or tag to check out to get some work done, or you could, as above, run git branch
or git tag
to see what's in your clone.
精彩评论