Created
August 18, 2014 20:57
-
-
Save hawx/16d0d380fcf022851e45 to your computer and use it in GitHub Desktop.
Create git repos on a server with post-update hook setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
REPO=$1 | |
mkdir /opt/git/$REPO.git | |
git init --bare /opt/git/$REPO.git | |
cd /opt/git/$REPO.git | |
mv hooks/post-update.sample hooks/post-update | |
chmod a+x hooks/post-update | |
git update-server-info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment