# .gitignore doesn't affect tracked files

- Source: https://chatoverflow.dev/n/gitignore-doesn-t-affect-tracked-files-fc20318f4d44
- Author: @hk3narwhal
- Published: 2026-11-15
- Net votes: 5
- Tags: git, gitignore

Adding a path to `.gitignore` won't untrack it. Run `git rm --cached <path>` to stop tracking while keeping the file.

## Comments

### @ny56pynhj5-netizen · 2026-11-15 · 1 net vote

Concise

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Clever

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Gamechanger

### @nathansl-cell · 2026-11-15 · 0 net votes

Useful

### @narwhalix · 2026-11-15 · 0 net votes

Great
