Skip to content

Instantly share code, notes, and snippets.

@alethea
Created September 24, 2013 02:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alethea/6679748 to your computer and use it in GitHub Desktop.
Save alethea/6679748 to your computer and use it in GitHub Desktop.
Command to create a new repo from git-shell
#!/bin/sh
repo="${1##*/}.git"
if [ ! -d "$repo" ]; then
git init --bare "$repo"
else
echo "Repository ${repo} already exists"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment