Clone failing against my new Windows 7 Git server using copssh, msysgit
I have created a git server on my Windows 7 box following Tim Davis' tutorial Got everything working up to the part of actually trying to clone the repository. I have a repo located on my server at: C:\SSH\home\repos\testapp.git that 开发者_JAVA百科I have initialized using git --bare init as per the tutorial, and try to clone it using GiT GUI via: ssh://repos@myurl/SSH/home/repos/testapp.git
but get an error dialog popping up describing "Clone failed. Cannot determine HEAD. See console output for details." and "Couldn't find remote ref HEAD".
I tried making a new repo out of an existing project folder (hoping that this 'ref' would magically correct itself) but the same thing message occurs.
Is there something more after a '--bare' or an 'init' that needs to be done to set the head reference?
Most probably it's failing because it is an empty repository. You can try to add an initial ( dummy commit if needed ) to the repository and try the cloning again. Steps below if you don't know to do this.
Can you do this:
cd /home/repos
mkdir testapp.wd
cd testapp.wd
git clone ../testapp.git .
<now add some file>
touch README
git add README
git commit -m "Adding a initial commit"
git push origin master
cd ..
rm -rf testapp.wd
Now see if you can do the clone that you were trying.
If remote repository is empty, it will happen. Try to commit something.
精彩评论