How to setup a Git server
To create a git server, you need to do the following:
- Setup SSH.
- Install git.
- You are done.
Yes. You are done, if you are intending to use it as a personal git backup server (Which is what I need it for).
You just create a git repository anywhere you want (I do it at
~/git/
) using the following command.
git init --bare <<repo-name>>
To clone this repo, use the following command on your local machine.
git clone username-on-server@serverhostname(or ip address):git/repo-name