Skip to content

Instantly share code, notes, and snippets.

@webarthur
Last active November 6, 2017 21:57
Show Gist options
  • Save webarthur/46ab47cce69a3edc3ebd to your computer and use it in GitHub Desktop.
Save webarthur/46ab47cce69a3edc3ebd to your computer and use it in GitHub Desktop.
# add user webarthur
adduser webarthur
# add git group
addgroup git
# add user to group
usermod -a -G git webarthur
# start git
git init
# create server git push hook to update server files
printf "#\!/bin/sh\nGIT_WORK_TREE=`pwd` git checkout -f\n" > .git/hooks/post-receive
# add hook permissions
chmod +x .git/hooks/post-receive
# group/user permissions
chown -R webarthur:git .
# bare configure
git config --bool core.bare true
## git clone ssh://username@host.xyz/var/www/www.example.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment