Created
January 28, 2013 15:39
-
-
Save dev4dev/4656536 to your computer and use it in GitHub Desktop.
newgit shell command
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
function newgit() { | |
if [[ ! -d "$1" ]]; then | |
mkdir $1 && cd $_ && git init && touch README.md && git aa && git ci -m Initial | |
else | |
echo 'ERROR: such directory already exists.' | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment