Skip to content

Instantly share code, notes, and snippets.

@jblanche
Created January 7, 2012 18:17
Show Gist options
  • Save jblanche/1575544 to your computer and use it in GitHub Desktop.
Save jblanche/1575544 to your computer and use it in GitHub Desktop.
awesome alias for new git projects
# gitdir : mkdir, cd to it, init git, create initial empty commit
# usage gitdir projectName
function gitdir() {
mkdir -p "$1" && cd "$1" && git init && git commit --allow-empty -m 'initial commit';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment