Everytime I start a project I have to think carefully about which files to exclude from source control. Has someone made a list of the criteria so I can look it up from the beginning? I work on my own so I have not got round to it. I appreciate that in the case of a DLL, you would want to include some and exclude others, so it is not just dependent on the file extension. My projects are ASP.Net, although a general discussion of other templates would also be useful.
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
- Should I use static function in c# where many call
Generic ingores from a project folder:
And from the solution (a level up)
We've also got the following - which are instance specific config settings referenced out of generic configs (i.e. web.config for asp.net apps)
There are .config.sample files that are version controlled.
You should probably set bin, obj, *.cache, *.user and *.suo as global in your subversion setup - but as this is (if memory serves) machine specific you're probably going to end up doing explicit ignores anyway
Do not sourcecontrol
bin
andobj
folders, as well as*.suo
and*.user
(if you're using Visual Studio) files.If you feel uneasy about keeping third-party DLLs in source control, try Componento, which, granted, does not yet have a sizable components database.
If you use ReSharper, be sure to exclude
_Resharper*
foldersIf you're using Subversion for source control then the VisualSVN Visual Studio plug-in will manage excludes for you automatically.
Be sure to include any third-party dlls that your project references that won't be in the GAC of your build or deployment machines. Our practice is to have a
lib
folder that all such dlls live in, and we add references to them from that folder. This ensures that thehintpath
property in thecsproj
file is correct (it stores a relative path to the referenced dll).As a general rule, only source control files which are required to build the application.
From http://blog.goneopen.com/2009/06/git-excludes-for-dotnet/: