Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 528
Pedro Tainha Avatar asked Nov 20 '18 15:11

Pedro Tainha


1 Answers

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 :)

like image 125
Kapcash Avatar answered Nov 15 '22 05:11

Kapcash