I have a bunch of git repositories that I started in my box. Now I want to put them on a server and access them through ssh. Here are the commands that I used to make that happen:
- Make a special clone:git clone –bare PROJECT project.git
- Put special clone on directory in server : scp -r project.git uname@server:path
- Make sure you have correct permissions. Use chmod.
- Test your setup. git clone ssh://uname@server/path/project.git
The first command makes a copy of the git metadata only. That means that you will not house unnecessary data on the server.