Skip to content

Instantly share code, notes, and snippets.

@dev4dev
Created January 28, 2013 15:39
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 dev4dev/4656536 to your computer and use it in GitHub Desktop.
Save dev4dev/4656536 to your computer and use it in GitHub Desktop.
newgit shell command
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