0

I start use babel to transform and minify my .js files but i don't want that the generated files be tracked on git.

enter image description here

I tried add the following code on git ignore, but it is not working:

**/*es5.js
**/*es5.min.js

Can any one tell me what i'm doing wrong?

Ricardo Rocha
  • 11,592
  • 13
  • 62
  • 108
  • If you already committed those files you can't ignore them: https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore – bobek Nov 29 '17 at 15:27

1 Answers1

0

If they are already being tracked by git, they cannot be ignored unless you tell git to stop tracking them.

Run the following

git rm -r --cached **/*es5.js **/*es5.min.js
git commit -m"Untrack generated files"

Additionally you can change your .gitignore file to read;

*es5.js
*es5.min.js

.gitignore already recursively looks through the repository for filenames

Edmund Dipple
  • 1,996
  • 14
  • 12