At One Place

.gitignore files

.gitignore file
Git Ignore File
A list of file patterns Git should not track.

What opens a .gitignore file

Windows
Visual Studio Code, Notepad (built in), Notepad++
macOS
Visual Studio Code, TextEdit (built in), nano
Linux
Visual Studio Code, Text Editor (built in), nano

What a .gitignore file is

A .gitignore lists glob patterns for files Git will leave out of a repository — build output, dependency folders, .env files, editor cruft. It is plain text, one pattern per line, with # for comments. Adding a pattern does not remove a file already committed: that needs git rm --cached, which is why secrets stay in history long after someone "added it to gitignore".

Converting it

A .gitignore file is commonly converted to .txt. It is a plain text format, so any text editor can open and edit it directly.

Details

Extension
.gitignore
Full name
Git Ignore File
Category
Data
MIME type
text/plain
Created by
Git project
Format
Plain text

Common questions

How do I open a .gitignore file?
On Windows use Visual Studio Code; on macOS use Visual Studio Code; on Linux use Visual Studio Code. A list of file patterns Git should not track.
What is a .gitignore file?
Git Ignore File. A .gitignore lists glob patterns for files Git will leave out of a repository — build output, dependency folders, .env files, editor cruft. It is plain text, one pattern per line, with # for comments.
Can I convert a .gitignore file?
Yes. It is usually converted to .txt, either by exporting from one of the programs listed above or with a format converter.

Related pages

Sources

  1. Media Types Registry — IANA
  2. Official vendor product documentation — At One Place

How these figures are compiled and checked