Skip to content

Instantly share code, notes, and snippets.

@doublerebel
Created January 14, 2014 07:20
Show Gist options
  • Save doublerebel/8414437 to your computer and use it in GitHub Desktop.
Save doublerebel/8414437 to your computer and use it in GitHub Desktop.
#!/bin/sh
cd /home/git/repositories/$1
git config --bool core.bare false
git config --path core.worktree $2
git config receive.denycurrentbranch ignore
echo '#!/bin/sh\ngit checkout -f\n' >> hooks/post-receive
chmod +x hooks/post-receive
cd -
@doublerebel
Copy link
Author

Deploys bare gitlab repo into local folder for staging/review.
For use with gitlabhq/gitlabhq.

Usage

$ runasgit deployrepo user/repo.git /path/to/deploy/folder

Links

runasgit gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment