Skip to content

Instantly share code, notes, and snippets.

@mitchallen
Created April 21, 2012 15:27
Show Gist options
  • Save mitchallen/2437727 to your computer and use it in GitHub Desktop.
Save mitchallen/2437727 to your computer and use it in GitHub Desktop.
Example global .gitignore file
####################################################
# Global .gitignore Flle
# Reference: http://help.github.com/ignore-files/
# Save this in a file: ~/.gitignore_global
# Then at the command line (you will see more info if a repo is in the current folder):
# git config --global core.excludesfile ~/.gitignore_global
# git config --list
#####################
# Maven #
#########
target/
# Eclipse #
###########
*.classpath
.settings/
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
@Yousha
Copy link

Yousha commented Jun 13, 2017

@jart
Copy link

jart commented Sep 25, 2017

While stuff like .DS_Store* should absolutely be in .gitignore_global, stuff like *.o you might not want in there, since you might forget to .gitignore it for other devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment