ignore files named npm-debug.log.XXXXXX in .gitignore

2.3k Views Asked by At

Does anyone knows how to ignore this file from the repository with .gitignore?

enter image description here

I'm using Gitlab.

I've already tried this:

enter image description here

Thanks in advance

1

There are 1 best solutions below

1
Kapcash On

The gitignore line is correct, but git ignores it if some matching files are already pushed to the remote repository. It means the files are in the git index, so it will want to stage them until you remove it from index.

You could try to delete the file from the git index using

git rm --cached npm-debug.log.xxx

See more on this thread :)