Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

.gitignore

advancedwidespread

.gitignore is a simple text file that tells the Git version control system which files not to track and not to upload to the shared code repository.

In plain terms

Imagine you are moving house and place a note next to the boxes for the movers: 'do not bring the trash, the key ring, or the food left in the fridge'. A .gitignore file is just such a note in a software project folder. It lists what can stay on your machine but does not belong in the shared version.

The Git version control system by default detects every file in the project folder and offers to save it. However, many files have no business in the shared repository: these include temporary files, huge folders generated by your machine, personal settings, and especially files containing passwords and access keys.

This file is not a program, nor is it protection: it is just a list, with one pattern per line. It is for Git; it does not delete or hide files on your machine. In the AI era, it has become more important because many coding agents consult it when deciding which files to work on. Additionally, an agent can easily upload something it should not.

How it works

  1. In the project's root folder, you create a text file named .gitignore. Its name starts with a dot, so it appears as a hidden file on many systems.
  2. You write one pattern per line: it can be a specific filename (e.g., .env), a folder (node_modules/), or a wildcard pattern (*.log, meaning every file ending in .log).
  3. When Git scans the folder, it simply skips untracked files matching the patterns: it does not flag them as changes, and they are not included in the save.
  4. You can make an exception with an exclamation mark (!important.log). This does not work if you have excluded the entire folder containing the file. Subfolders can also have their own .gitignore file, which applies only to that section.
  5. You usually upload the .gitignore file itself to the shared repository, so the same rules apply to every team member and the coding agent.

An everyday example

You try an AI tool requiring a paid API key and save the key in a file named .env in your project folder. If .env is on the .gitignore list, the key stays on your machine when you upload the code to GitHub. If it is not, the key may become public, and someone else could spend your money within minutes.

Who is affected

developerIn every project, this decides what goes into the shared code repository and what stays on your own machine. → Code
entrepreneur, executiveA single missing line can leak a company's password or customer data, costing money and trust.
parent, student, teacherAnyone learning to program or building their first AI application will encounter it at their first public upload. → Education & Family

A common misconception

MythIf I add a file to .gitignore, it disappears from the repository and is safe.
In reality.gitignore only affects files not yet tracked: once uploaded, they remain in the repository and among previous versions. In such cases, the leaked password must be changed, and the file must be removed separately.

Limits and risks

Similar, but not the same

Related concepts

Broader

Git, version control, configuration file

Narrower

global .gitignore, gitignore-sablon

On the edge

code repository, commit, GitHub, API key, environment variable

A brief history

Git, the version control system, was launched by Linus Torvalds in 2005, and the list of files to be ignored became part of the system very early. The solution was not new: earlier version control systems, such as CVS, used similar 'ignore' files.

Where things stand

At the end of 2026, it is present in practically every project that uses Git, and development tools and GitHub offer ready-made templates for it. With the spread of coding agents, its role has grown, and several AI tools have introduced their own exclusion lists based on a similar principle.

Status: 2026 November

Also known as

.gitignore · gitignore · gitignore file · git ignore · ignore file · exclusion list · gitignore file

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.