I have committed loads of files that I now want to ignore. How can I tell git to now ignore these files from future commits?

EDIT: I do want to remove them from the repository too. They are files created after ever build or for user-specific tooling support.

9 s
9

  1. Edit .gitignore to match the file you want to ignore
  2. git rm --cached /path/to/file

See also:

  • How do I git rm a file without deleting it from disk?
  • Remove a file from a Git repository without deleting it from the local filesystem
  • Ignoring a directory from a Git repo after it’s been added
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *