From the command line
1. Create a .gitignore file
2. Save the following contents
# # Filename: .gitignore # Date: Sunday 5/29/2011 # Aurhor: Mike Hanley ([email protected]) # # Description: # The file tells git what files to ignore during add and commit # operations. This has been optimized for development using # Microsoft Visual Studio 2010. # # # Windows and Mac OS X Temp Cache Files # [Tt]humbs.db *.DS_Store # #Visual Studio files # *.[Oo]bj *.user *.aps *.pch *.vspscc *.vssscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.bak *.[Cc]ache *.ilk *.log *.lib *.sbr *.sdf ipch/ obj/ [Bb]in [Dd]ebug*/ [Rr]elease*/ # #Tooling # _ReSharper*/ *.resharper [Tt]est[Rr]esult* # #Project files # [Bb]uild/ # #Subversion files # .svn # # Microsoft Office Temp Files # ~$* # End of File
3. Add to the repo
git add .gitignoregit
4. commit to your local repo
git commit -am "Adding .gitignore for Visual Studio 2010"
5. push to the master
git push origin master
All done.