DEV Community

Henrique Holtz
Henrique Holtz

Posted on

The easiest and best way to create the gitignore file for .Net repositories

Have you ever had to google "gitignore file for .Net apps", copy and manually create it into your repository?

That was a common situation to me before I found out a easiest (and better) way to do that.

Basically instead the manual path, you can simply use the .NET CLI to do that automatically for you, just type the command below:

dotnet new gitignore
Enter fullscreen mode Exit fullscreen mode

Done! The .NET CLI created the .gitignore for you.

It was pretty simple, right?

Top comments (1)

Collapse
 
flimtix profile image
Flimtix

Nice command. I didn't know the .NET CLI had this feature. πŸ‘
I have always used gitignore.io.