0

I have create my git server with this link link git clone working in server but when i clone my project on local machine i have a problem "warning: remote HEAD refers to nonexistent ref, unable to checkout." i used for clone "git clone http://domain.com/project.git" i used virtual machine(domain.com =192.168.1.196) for git server and windows for local machine. Thanks

TliliDroid
  • 26
  • 8

1 Answers1

1

On the server run the following command in a new folder to initialize a new bare git repo...

git init --bare

On your local machine go to an existing folder of create a new one and run.

git init

Copy a file into this folder and execute.

git commit -am "New repository with a new file"

Then add your server as a remote.

git remote add myserver http://domain.com/project.git

Next step is to push to your server.

git push -u myserver master
Split Your Infinity
  • 4,159
  • 1
  • 21
  • 19