Created
January 20, 2012 10:11
-
-
Save ravenscroftj/1646546 to your computer and use it in GitHub Desktop.
Initialise a shared git repository in BASH
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
#!/bin/bash | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: $0 <path/to/repository> <GitGroupName>" | |
exit 0 | |
fi | |
#make the directory | |
mkdir $1 | |
#init the repository | |
git init --bare --shared $1 | |
#make sure the repository is shared amongst the git group | |
chgrp -R $2 $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment