-
Create the repo directory (the ‘.’ prefix is to make it hidden)
mkdir .myrepo.git
-
Go inside the directory
cd .myrepo.git
-
Initialize the git repo
git init --bare
Our repo is now ready
to clone:
git clone /path/to/.myrepo.git where_to_clone
NOTE: the first push must be
git push origin master
And now you can work from that directory as usual ;)