Git global gitignore

21 Nov 2013 · Less than one minute read · on Gianluca's blog

.gitignore helps me manage my commits by setting which files or directory don’t end in my repository. I know two good practices if you work for example on an open source project:

I follow this practices for all my projects, if you are Mac user you have a DS_STORE files, there is a method for exclude this file of default.

~./.gitconfig is your configuration file, every user has it. If you execute this command

$. git config --global core.excludesfile ~/.gitignore_global

into this file it write thiese lines

[core]
excludesfile = /Users/gianarb/.gitignore_global

/Users/gianarb/.gitignore_global is my global gitignore file!

# IDE #
#######
.idea

# COMPOSER #
############
composer.phar

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Something weird with this website? Let me know.