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
Because they were already in the index.
https://git-scm.com/docs/git-rm#git-rm---cached
allows you to remove files from the index, respectively, gitignor will affect them. git rm -rf --cached ios/build
For example.
Let me explain.
-r - recursively go through the given directory.
-f - so as not to swear at anything.
The -rf entry is allowed by convention.
--cached - remove only from the index (not the files themselves).
ios/build - let to the folder in which to carry out this execution. (you can also write down the full path)
leave the package-lock.json by the way.
$ echo debug.log >> .gitignore
$ git rm --cached debug.log
(This removes (rm) 'debug.log')
$ git commit -m "Start ignoring debug.log"
The last command is important, I don't have it didn't work.. From here https://www.atlassian.com/git/tutorials/saving-cha... ignoring-a-previously-committed file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question