Git - .gitignore

.gitignore

Git uses a file called .gitignore that is in the root directory of your project. (the same directory that contains the .git repository directory)

  • This is a list of files you don’t want kept track of within git.

  • Use One row per file spec. For example

1
2
3
.vs/
/.vs
Obj/

The goal is to remove all artifacts added to your working directory by the various programming tools and leave git to keep track of just the code of the project.

Visual Studio TFS [Changes] has a good list of file that will be added/commited to source control – use this to help construct the .gitignore file