I have a node project and I am trying to ignore my package.json.
I have added package.json inside .gitignore.
Basically I am working on creating swimlanes and I have another project's package.json overwritting the existing project's package.json.
What i see happening is the package.json file is overwritting the existing and its not ignoring the new package.json althought its in the .gitignore.
I tried
git rm --cached
and
git add .
But this is deleteing my package.json file from my local which I dont want
Expected: I need the package.json to be igniored when I pull the new package.json using grunt fetchFromArtifactory.
If you already are tracking a file, you can't add it to .gitignore
. Then git will start to track that file changes.
You can look at this answer to how to tell git to ignore changes in a tracked file.
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