Skip to content

Instantly share code, notes, and snippets.

@MugunthKumar
Created January 19, 2011 02:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MugunthKumar/785561 to your computer and use it in GitHub Desktop.
Save MugunthKumar/785561 to your computer and use it in GitHub Desktop.
Initialize a git repository and copy a git ignore file from your home directory
# Copy this file to /usr/local/bin/ on your Mac
# type chmod +x initgit.sh
# From now on, on any folder, you can just type initgit.sh and a new git repo with a default .gitignore file will be created for you.
#! /bin/sh
git init
cp ~/.gitignore .
rm -r build/
git add .gitignore
git add *
git commit -a -m "Initial Commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment