asp.netgitrazor

.gitignore for asp.net razor project


I'm learning asp.net core 2.0 and I've created a new project with the command dotnet new razor -o myworkingdir.

I want to put this project into a git repository, and I'd like to know what I have to write into the .gitignore file in order to avoid to commit useless things.

What's an example of a .gitignore file for a new asp.net Razor project?


Solution

  • This GitHub repo has a good collection of .gitignore files you can download and modify for your specific needs as they arise.

    https://github.com/github/gitignore

    You would use https://github.com/github/gitignore/blob/master/VisualStudio.gitignore in particular.