Best way to create a .gitignore for .NET projects
Try `dotnet new gitignore` on your CLI 🤖
1 min read
dotnet new gitignore
Built-in since .NET Core 3.0 🤯
I just started learning .NET, so I'm creating a lot of projects, it's been a great experience so far 🚀
I usually publish my projects as open source on Github, so it wouldn't look nice if they include
bin/, or other specific editor things included. Storing such files is messy and even dangerous in some cases.
Example: You could forget to clean from those artifacts your secret password ⚠
Coming from other ecosystems, I used to visit gitignore.io to solve this problem, but it's something I always looked to optimize.
This problem is solved elegantly on .NET 🤩
I recommend you to visit the remaining documentation of
dotnet new, it includes many great and useful things that I will be documenting little by little in future blogs!