Git global gitignore

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

Hello! If you want to work with me I recently started my own business. You can find what is all about visiting shippingbytes.com.

.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

If you want to have a chat about this blog post or everything else I do here you can find my public inbox. Send an email. That's all it takes and I hope you appreciate it.
Based on how often you contribute it may take moderation before your email shows up in the archive

Something weird with this website? Let me know.