thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Foundational

.gitignore

A file listing patterns of files and directories Git should not track, such as build outputs and secrets.

Definition

Patterns apply to untracked files only; files already committed must be removed with git rm --cached. Typical entries include __pycache__/, .venv/, *.tfstate, and .env.

Example

Adding *.tfstate and .terraform/ to .gitignore prevents committing Terraform state.

Exam tip

.gitignore does not untrack already committed files and is not a security control for secrets already pushed.

Related terms