DEV Community

Senad Meškin
Senad Meškin

Posted on

2 1

Powershell script that downloads .gitignore template by name

There is a Github project, if you didn't know about it already, that contains common .gitignore template files for different platforms, IDE-s, Frameworks, Languages, etc.

To get the file by yourself you can:

  • Clone project than copy files that you need
  • Copy contents of the file and create it locally
  • Or use a PowerShell script to download it into the active folder

Download script from repository https://github.com/senad-meskin/powerscripts or you can copy the contents of the file directly from https://raw.githubusercontent.com/senad-meskin/powerscripts/master/git-ignore.ps1 and save it locally inside the folder that is added to your Environment PATH.

To download a template from the repository https://github.com/github/gitignore just call the script and pass template name as the first parameter (Case sensitive)

git-ignore VisualStudio
Enter fullscreen mode Exit fullscreen mode

where VisualStudio is a template name without .gitignore extension from Gitignore repository

List of .gitignore templates

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs