Skip to content

Instantly share code, notes, and snippets.

@yrchen
Created April 12, 2011 20:41
Show Gist options
  • Save yrchen/916357 to your computer and use it in GitHub Desktop.
Save yrchen/916357 to your computer and use it in GitHub Desktop.
Remote Machine
$ cd git
$ mkdir somesite.git
$ cd somesite.git/
$ git init --bare
Initialized empty Git repository in /home/caius/git/somesite.git/
$ git --bare update-server-info
$ git config core.worktree /home/caius/vhosts/somesite.com/htdocs
$ git config core.bare false
$ git config receive.denycurrentbranch ignore
$ cat > hooks/post-receive
#!/bin/sh
git checkout -f
^D
$ chmod +x hooks/post-receive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment