solidsloth / dotnet-gitignore

A dotnet extension for creating a Visual Studio .gitignore file.
MIT License
40 stars 11 forks source link

dotnet-gitignore

This is a simple dotnet tool that extends the dotnet cli to generate a .gitignore file for Visual Studio/.NET projects.

Purpose

I like to use the dotnet cli to create projects while working with VSCode and it bugged me that I need to track down a .gitignore file every time I wanted to create a new project.

What it Does

The tool downloads the official Visual Studio .gitignore from GitHub. It also caches a copy in your user profile folder in the event that you are offline.

Install

To install use the dotnet cli tool install command:

dotnet tool install -g dotnet-gitignore

This will install the tool globally. See this page for more information.

Note: You likely will need to restart your terminal to update your path before the dotnet gitignore command will work.

Usage

The tool installs as a dotnet cli extension and can be run using:

dotnet gitignore

Currently the tool only accepts a single argument: the path where to .gitignore should be generated. If no path is specified, then the current working directory is used.

dotnet gitignore ../

Update

dotnet tool update -g dotnet-gitignore

Uninstall

dotnet tool uninstall -g dotnet-gitignore