-1

in my AngularJS project , we coding with TypeScript, and compiling with NodeJs. now the problem is every time i run npm compile , there are many .js & .js.map file modified on local git repository. enter image description here

how to ignore those modified file in git? thanks for help in advance.

Victor Guan
  • 106
  • 1
  • 1
  • 10
  • 1
    Possible duplicate of [How to make Git "forget" about a file that was tracked but is now in .gitignore?](http://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore) – 1615903 May 15 '17 at 08:05

1 Answers1

0

Add following lines in the .gitignore file

app/**/*.js
*.js.map
e2e/**/*.js
e2e/**/*.js.map
Praveen M P
  • 11,314
  • 7
  • 34
  • 41
  • Praveen,still show modified file on git bash. as Git doc introducing "A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected;" currently modified files had tracked by Git. how to resolve this matter? – Victor Guan May 15 '17 at 07:52
  • @VictorGuan i think this will help http://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore – Praveen M P May 15 '17 at 07:54