I
I
Igor Shumilovsky2015-11-11 11:12:34
git
Igor Shumilovsky, 2015-11-11 11:12:34

How to remove a folder with files in git from tracking?

Made a commit and forgot that I didn't add node_modules to gitignore. Is it possible to remove it from tracking without rollbacks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-11-11
@JiSeven

1. Remove the folder from git: git rm -r --cached node_modules
2. .gitignore must be written node_modules/.
3. Well, commit the changes, of course.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question