I’ve written a few blog posts on how to exclude files from publishing/packaging. In each of these posts you’d have to be familiar with MSBuild and the Web Publish process. I’ve been looking for a much simpler way to exclude files/folder from publishing. When using git you can easily exclude files and folders using a .gitignore file. Inside the .gitignore file on each line you can add a pattern that matches files/folders to be excluded from the repository. For example take a look at the sample .gitignore file below. # Folders to ignore # OutputRoot/ TestResults/ bin/ obj/ BuildOutput/ # Known files to ignore always # *.suo *.user ~*.docx *.metaproj* In the .gitignore file above you can see how easy it is to exclude files and folders from publishing...(read more) ...
Go to the complete details ...