Last active
August 29, 2015 14:03
-
-
Save tshev/95c8012adb5604d4d4a1 to your computer and use it in GitHub Desktop.
Git repo creator
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 | |
echo "Enter your path to the repository without name" | |
read path | |
cd $path | |
echo "Enter the reponame" | |
read reponame | |
mkdir "$reponame"".git" && cd "$reponame"".git" | |
git init --bare | |
cd hooks | |
echo "Enter the path to --work-tree" | |
read work | |
echo "git --work-tree=$work --git-dir=$path/$reponame"".git"" checkout -f" > post-receive | |
mkdir $work | |
chmod +x post-receive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment