git을 쓰면서 git에 올리고 싶지 않은 파일/폴더들은 .gitignore
에 넣어서 git tracking을 방지할 수 있다.
하지만 실수로 add를 해버렸거나 이미 git으로 관리중인 파일/폴더를 제거하고 싶을 때가 있는데, 그럴땐 rm
명령어를 사용해서 git에서 제거해주면 된다.
(물론 gitignore
에도 추가해 주어야 다음부터 다시 추가되지 않는다.)
git rm -r --cached whatever_you_want/
'tools > git' 카테고리의 다른 글
How to remove untracked local files from git work tree (0) | 2018.04.25 |
---|---|
Remove big file history in git (0) | 2018.04.24 |
Git branch, merge, checkout 명령어 모음 (0) | 2017.03.22 |
git commit시 vi 에러: there was a problem with the editor 'vi'. git (0) | 2017.03.18 |
ubuntu git gui 프로그램, smartgit 설치 (0) | 2017.03.16 |