Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Such files are added to .gitignore just like any other file.
But I suspect that the issue is different. Do you want the files to disappear from the project?
You see that the file has not disappeared anywhere and concluded that the file has not been added to ignore. But it's not.
In fact , you don't need .gitignore at all, because adding a file to ignore will not automatically remove it from the repository if it has already been added to the tracked ones. This file is needed only so as not to accidentally add too much to the repository. But even it will not prevent us from adding any file to the repo with the git add command file
When you do not want to see the file in the repo, just delete it physically and make a commit.
If the file is needed in the working directory, but you do not want it to shine in the repository, then remove the file only from the index with the command git rm --cached filename and commit it.
The author of the question wants something strange
. You first remove them from the turnip, and then add them to gitignore
gulpfile.js
package-lock.json
package.json
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question