Skip to content

Instantly share code, notes, and snippets.

@kuwabarahiroshi
Created January 28, 2014 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuwabarahiroshi/8662926 to your computer and use it in GitHub Desktop.
Save kuwabarahiroshi/8662926 to your computer and use it in GitHub Desktop.
Gitのbare repositoryとworktreeを設定する一連のコマンド
mkdir project.git
cd project.git/
git init --bare
git --bare update-server-info
git config core.bare false
git config core.worktree /path/to/project
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