이미 파일을 커밋하고 푸시했는데 그 파일에 노출되면 안되는 key같은게 들어가야할 수도 있다. 그럴 때 push된 파일을 git 캐시에서 제거하고 커밋, 푸시해주면 된다.
git rm --cache /path/to/file .gitignore에 추적에서 제외할 파일, 디렉토리 추가 git commit -am "Remove file" git push
git rm --cache /path/to/file
git commit -am "Remove file"
git push