I have the following structure
I want to tell .gitignore
to ignore js
, map
file types.
I tried the following
# =========================
# Web essentials auto-generated files
# =========================
TypeScript.Content/Scripts/*.js
TypeScript.Content/Scripts/*.js.map
But when I change the js file (or 'create' it) it adds to the list of pending changes...
Is something wrong?
It seems that the .js
and .map
files that you wish git to ignore are already present in the index. You need to tell git to un-track those files:
git rm --cached TypeScriptTest.Content/Scripts/*.js
git rm --cached TypeScriptTest.Content/Scripts/*.js.map
Quote from GitHub help on Ignoring files:
Note that git will not ignore a file that was already tracked before a rule was added to this file to ignore it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With