Last active
February 12, 2016 17:20
-
-
Save thbkrkr/d37ea4a4f912286ceb9b to your computer and use it in GitHub Desktop.
Prepare git repo with push and update
This file contains 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
# curl -sSL https://gist.github.com/thbkrkr/... | sh -s ops.git | |
repo=$1 | |
[ ! -d $repo ] \ | |
&& mkdir $repo && cd $repo \ | |
&& git init && git config receive.denyCurrentBranch ignore \ | |
&& echo '#!/bin/sh' > .git/hooks/post-receive \ | |
&& echo "GIT_WORK_TREE=$repo git checkout -f" >> .git/hooks/post-receive \ | |
&& chmod u+x .git/hooks/post-receive \ | |
|| echo "$repo is ready" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -L git.io/gitpush | sh -s "mydir"