Bite Bits/Git
이미 commit 되어 관리 중인 파일 제외 시키기
상영
2017. 6. 1. 15:58
이미 git 에 commit 되어 관리되고 있는 파일을 더 이상 관리하고 싶지 않을 때,
> git rm --cached somefile.txt
하면 파일 자체는 삭제되지 않고, git 목록에서 삭제된다.
확인은 git status 로 하고.
> git commit -m 'somefile is not managed.'
이렇게 commit 후,
> git push orign master
이렇게 서버에 push 하고,
.gitignore 파일에 somefile.txt 를 추가하면 된다.