Ramblings of a Code Monger

The weblog of some guy named Cameron Cox

Posts Tagged ‘git setup

So I -don’t- forget

without comments

On your server/VPS/file server/awesomesauce

$ sudo mkdir -i /var/git
$ sudo chmod -R 1775 /var/git
$ cd /var/git
$ mkdir project.git
$ cd project.git
$ git --bare init
$ exit

On your workstation

$ cd ~/Projects # this is where I keep my stuff, so YMMV
$ mkdir new-project
$ git init
$ touch README
$ echo "Hello, and welcome to git!" > README
$ git add README
$ git commit -a -m "Hello World!"
$ git remote add origin user@server:/var/git/project.git
$ git push origin master

For read-only pulls, look into git over HTTP or setup git-daemon. It’s not very hard.

Written by Cameron

April 4, 2008 at 8:47 pm

Posted in Uncategorized

Tagged with