1
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
*.orig
*.min.*

these are the first few lines of my git ignore files and I can't seem to figure out why git is not igoring any of my .min.js files. I've already checked other questions on here but can't seem to figure out why still. Also, the min.js files are being re-generated every time I compile. Am I doing something wrong here? Also using Git-Extensions if that helps at all.

TNguyen
  • 1,041
  • 9
  • 24
  • 2
    Are the `min.js` files already part of the repository? – hjpotter92 Jul 04 '17 at 13:31
  • @hjpotter92 You're right, they are, ah I can't believe I forgot that. Thanks! – TNguyen Jul 04 '17 at 14:21
  • Possible duplicate of [How to stop tracking and ignore changes to a file in Git?](https://stackoverflow.com/questions/936249/how-to-stop-tracking-and-ignore-changes-to-a-file-in-git) – 1615903 Jul 05 '17 at 06:55

1 Answers1

5
*.min.*

is the correct syntax but that is not working if the files are added once to your repo. Then you have to remove them first from your repo to ignore that files.

git rm --cached filename

Git ignoring all minified suffixed files

René Höhle
  • 26,716
  • 22
  • 73
  • 82