Now on AppleNow on AndroidScan free

← All posts

Added .env to .gitignore after committing it? Ember says too late

Detective Ember sniffs this one often: .env added to .gitignore after the first commit.

.gitignore only stops git from tracking new files. A file already committed stays tracked, and it stays in your history. Git docs

The two-minute check

  1. Run git ls-files .env. If it prints the file, it's still tracked. Run git rm --cached .env.
  2. Run git log --all -- .env. Any commit listed still holds your secrets, so rotate every key in it.
  3. Then scan your own app on SniffPup. Full fixes free for every critical issue (no critical? one other fix is free).

Want one 2-minute check like this every morning? Sign up below.

Named after Ember, my black Pomeranian. Built by a software engineer and vibe-coding hobbyist to help you ship safely.