Tuesday, June 14, 2011

My Git Ignore File

I am using Git more and more these days and I really love how easy it is create branches and switch between them. If you have not tried out Git before, I really would encourage you to do so. Here is my current .gitignore file. This file basically tells Git what files to exclude when looking at a repository for changes, etc.

# 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
[Ii]con?
[Tt]humbs.db
# .NET Specific Folders #
#########################
[Oo]bj
[Oo]bj/*
[Bb]in
[Bb]in/*
deploy
deploy/*
_ReSharper.*
*.csproj.user
*.Resharper.user
*.resharper
*.suo
*.cache
~$*
*.licx
*/obj
# Pro Power Tools Document Tab Well Tracking #
###############################################
*.docstates
# VS Source Control information #
#################################
*.vspscc
*.vssscc
# Includes #
############
!lib/*.dll
!lib/*.xml
!/packages/*/lib/*.dll
!/packages/*/lib/*/*.dll
view raw .gitignore hosted with ❤ by GitHub

2 comments:

Anonymous said...

Really appreciated you sharing this file. I have a quick question for you: What if you are wanting to clone your project onto another computer, and you need all the supporting libraries, do you have a suggestion for handling this situation?

Thank you

Paige Cook said...

Actually, this scenario is already accounted for, as I am specifically including any files in the lib and packages folders, which are the two directories where my supporting libraries reside in all of my projects. So these are being added to the git repository and will be available in any cloned projects. Hope this helps.