Setting up a remote git repository with just git
2008-04-27 23:30:38 PST
Tags: git, Guide, Linux, Server
So Ubuntu hardy doesn't ship with the handy git wrapper/tool cogito because git has all the features in it incoperated... somewhere...
But documentation is surprisingly sparse. Anyways, if you want to set up a git repo nowadays using just git, it should go as something like follows:
root@server # cd /git root@server # mkdir newrepo root@server # chgrp git newrepo root@server # chmod g+ws newrepo root@server # cd newrepo root@server # git init
And if this is a public repository
root@server # touch git-daemon-export-ok
On the client side.
user@client $ cd project user@client $ git init user@client $ git add * user@client $ git commit -m "Initial code dump" user@client $ git remote add origin ssh://user@git.server.com/git/reponame user@client $ git push origin master
and after that regular
user@client $ git push
works just fine.




