I'm not able to "ignore" sending package-lock.json
to gitlab, when I run git status
it appears to be sent to me. Here is a print showing .gitignore
and my terminal when running git status.
.gitignorefile
If you want to remove this archive from the repository and make it no longer versioned in it, you need to add it to .gitignore
and remove it using the command below:
git rm --cached package-lock.json
Now, if you want to keep this file in the repository but do not want any new changes in it to be committed, you should use
git update-index --assume-unchanged package-lock.json
If you want to re-trace changes to it:
git update-index --no-assume-unchanged package-lock.json
I understand that you want the package-lock.json
file not to be added to the commit. This way it will also not be sent to the Gitlab repository.
If so, use the command git rm package-lock.json
.
So git will not manage more.