.gitignore

How to open a .gitignore file

Quick, free ways to open gitignore on any system.

A .gitignore file is a Git Ignore Rules File. If double-clicking does nothing, your computer simply does not have an app that reads gitignore yet. Here is how to fix that on each operating system, using free software wherever possible.

Open a .gitignore file step by step

  1. Confirm the file really is a .gitignore. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
  2. On Windows, open it with any text editor or VS Code.
  3. On Mac, use any text editor or VS Code.
  4. On Linux, try any text editor or VS Code.
  5. Still stuck? Search for a dedicated gitignore viewer.

Best apps to open .gitignore files

Windows

  • any text editor
  • VS Code

macOS

  • any text editor
  • VS Code

Linux

  • any text editor
  • VS Code
!
Before you open it: Safe. A .gitignore file is a plain-text list of patterns; it does not execute. Its main risk is misconfiguration, like accidentally ignoring files you meant to commit.

Frequently asked questions

Why can't I open my .gitignore file?

Almost always because no installed app understands gitignore. Install one of the apps above, or convert the file to a format your existing software already reads.

Why is my .gitignore not working?

Almost always because the files were committed before the rule was added. Run git rm --cached on them (they stay on disk), commit, and the rules apply from then on.

Where does the .gitignore file go?

Usually in the repository root, but any folder can have its own. Git also supports a global ignore file for personal editor and OS clutter across all repos.

Learn more about .gitignore