Y
Y
Yuriy2017-04-24 17:17:37
git
Yuriy, 2017-04-24 17:17:37

Git add filename, but how to remove?

I’m not very good with git yet, the question is we add files with the git add command, but what if the wrong folder was accidentally added, and now they are in the tracked .. how to remove what was added through add?
So?
git rm -r --cached dir/file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Krasnodemsky, 2017-04-24
@yous

git rm --cached -r yourdir

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question