Thursday, 8 December 2011

Git .gitignore File and Visual Studio

Just started using Git and GitHub in the last few weeks (missing TFS to be honest!). Anyway it's handy to put a .gitignore file in the root of you repository folder to stop Git showing all the files you don't want to Commit. First off in Windows it's not easy to create a .gitignore file as Windows complains about the file not having a name, so this can be solved by launhing Notepad from a commandline with .gitignore as the file argument:

notepad.exe .gitignore

There is a standard selection of ignore rules on the Help.GitHub site.

In addition to these I added the following for VS:

# VS files
######################
*.suo
*.user
Bin/
obj/
*.
*.vsmdi
*.testsettings
*.cachefile

No comments:

Post a Comment