How to create a remote Git repository from a local one?

Nips picture Nips · Jul 11, 2011 · Viewed 245.1k times · Source

I have a local Git repository. I would like to make it available on a remote, ssh-enabled, server. How do I do this?

Answer

Kerrek SB picture Kerrek SB · Jul 11, 2011

I think you make a bare repository on the remote side, git init --bare, add the remote side as the push/pull tracker for your local repository (git remote add origin URL), and then locally you just say git push origin master. Now any other repository can pull from the remote repository.