Git protip: easy templates for `.gitignore`
By Maxime Bréhin • Published on 10 April 2023
• 1 min
Cette page est également disponible en français.
You may have read our tutorial which explains how to ignore (or not) files in Git. So, you started writing your
.gitignore file at the root of your project, and you probably realized that there were plenty of things to add to it:
- files related to the operating system (
.DS_Storefiles on Mac,
.swpon linux…) ;
- technical files related to an IDE or the project context (
How about we leverage existing templates?
You may have already seen, or even used, the templates provided by some platforms such as GitLab (at project initialization).
But it gets even better! Let me introduce you to the ultimate
.gitignore generation tool: gitignore.io!
It doesn’t get any easier: just fill in the tools, languages, OS… people work with on your project, then click “Create”, and you get a text content that you can copy-paste into the
.gitignore file for your project.
Isn’t life great?