From a0162699748806851b5a24473304b1aee161db95 Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Tue, 22 Mar 2016 14:41:54 -0700 Subject: [PATCH] Add instruction on removing cached directory/file from a repository I noticed that the file didn't have instructions regarding removing cached folders/files. Let me know what you think. If you think that it's useful information, Ill go ahead and translate it into English for the English version of the file. --- README.ko.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.ko.md b/README.ko.md index c2420f9..5d03b7c 100644 --- a/README.ko.md +++ b/README.ko.md @@ -709,8 +709,8 @@ $ git rm $(git ls-files -d) $ git status On branch master Changes not staged for commit: - deleted: a - deleted: c + deleted: a + deleted: c $ git rm $(git ls-files -d) rm 'a' @@ -719,8 +719,18 @@ rm 'c' $ git status On branch master Changes to be committed: - deleted: a - deleted: c + deleted: a + deleted: c +``` + +### Removing a directory/file from a repository +만약 .gitignore에 파일이나 폴더를 적어넣는걸 까먹었을땐, +이 커맨드들로 이미 push나 merge된걸 지울수 있습니다. +대부분 node_modules이나 bower_components를 적는걸 까먹었을때 이걸 씁니다 +``` +git rm -r --cached node_modules + git commit -m 'Removed cached folder' + git push origin master ``` ### Previous Branch