1

I have some files that are being committed and pushed to repo right now but suddenly I want to ignore them. I added on gitignore but it doesn't work. Apparently it doesn't work cause these files are already being track and can't be ignored.

My question is how do I untrack it using VS 2015? Hope someone can help me.

Thanks

Jed
  • 1,054
  • 1
  • 15
  • 34
  • Possible duplicate of [How to Move a Tracked File to Untracked using Visual Studio Tools for Git](http://stackoverflow.com/questions/29975193/how-to-move-a-tracked-file-to-untracked-using-visual-studio-tools-for-git) – Set Aug 06 '16 at 04:39

1 Answers1

1

You have to delete them and commit that deletion. And then, after, if they are really needed, recreate them (or because you're smart, move out of the folder, commissioned the delete and move back).

Philippe
  • 28,207
  • 6
  • 54
  • 78
  • Thanks for your help. This is a different question, in gitignore do you know why /Scrips/*.js doesn't work but *.js works? Thanks – Jed Aug 06 '16 at 02:46
  • The first will just ignore the js file in the 'scripts' folder (I imagine that the typo, the 't' missing is just in the comment...). Perhaps you should remove the first '/'. – Philippe Aug 06 '16 at 07:20
  • Yes it's just a typo. But no removing the first slash doesn't work. I have other js files in other location which I don't want to ignore. I only want to ignore js files inside Scripts folder which also has subfolders. – Jed Aug 10 '16 at 01:46