Git ignore all the crap, globally
Put the following file in ~/.gitignore
(edit it depending on your exact needs)
# visual studio specific files
*.user
*.ncb
*.sbr
*.suo
*.ilk
*.bsc
*.pdb
*.aps
*.pch
*.sdf
*.opensdf
*.sln.docstates
ipch/
# xcode specific files
*.pbxuser
*.ext
*.mode1v3
*.perspectivev3
xcuserdata/
# autotools specific files
*.sym
Makefile.in
config.h.in
autom4te.cache/
build-aux/
configure
# build files
build/
obj
*.obj
*.o
# vi / vim files
*~
.*.swp
# OSX finder crap
.DS_Store
# temporary
temp
tmp
.tmp
# git
*.orig
*.rej
Now to setup your global .gitignore
, just run
$ git config --global core.excludesfile ~/.gitignore
Written by Gregory Pakosz
Related protips
2 Responses
The IDE/text editor make sense on a per-computer basis. However, if you are doing any collaborative work, things like .DS_Store
and *.orig
should be placed into every project.
It is more effort across all persons to have a common set up like this than it is on a per-project basis especially if those people are strangers (e.g. GitHub).
over 1 year ago
·
Indeed, most collaborative projects will likely have their own .gitignore
.
Having a global .gitignore
helps certain cases but isn't a free pass for not having a proper per project .gitignore
.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#