Several developers are working on the project, and each of them has its own connection string in Web.Config. From time to time (usually several hours!), The developer forgets to exclude web.config from his commit, and soon everyone should go through at least a cycle of receiving errors, having discovered that due to an incorrect connection string, and correct it. The reason is that when people prefer to commit their changes, VS adds all the changes to commit. They may exclude it, but they forget it.
Is there a way to exclude a file from default commits ? Note that this is different from excluding a file from the repository that can be done in .gitignore.
source
share