Why Is Gitignore Not Ignoring

gitignore only ignores files that are not part of the repository yet. If you already git add ed some files, their changes will still be tracked. To remove those files from your repository (but not from your file system) use git rm –cached on them.

Why is my Gitignore not ignoring?

gitignore only ignores files that are not part of the repository yet. If you already git add ed some files, their changes will still be tracked. To remove those files from your repository (but not from your file system) use git rm –cached on them.

How do I ignore a .gitignore file?

  1. Add to your ~/.gitconfig file: [core] excludesfile = /home/username/.gitignore.
  2. Create a ~/. gitignore file with file patterns to be ignored.
  3. Save your dot files in another repo so you have a backup (optional).
Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest