I have an existing Git repository on my local machine. I would like to move that repository to my web server, then git clone on my local machine to check out my repository from the server. I’m planning on then developing on my local machine and pushing updates back to the server. I can ssh from my local machine to the server, but not vice versa. How should I go about this? I think git bundle should be used somehow, though when I tried to git clone my bundle on my server, I got a “warning: remote HEAD refers to nonexistent ref, unable to checkout” error. My local machine is running OS X, the server is running Linux.
I have an existing Git repository on my local machine. I would like to
Share
On the Linux server, in a new directory do:
Then on your local machine:
After that, the server will have a full copy of the repository, and you will be able to push and pull to and from it. There’s no need to check out another clone from the server when you’ve already got one locally.