undo1 [GIT] commit message 유지하면서 commit 에 포함된 파일 제거하기 참고 : https://goo.gl/jTWGvS git commit -C option 추가하지 않아야 할 파일을 실수로 add 하여 git commit 까지 한 경우, 기존 commit message 를 유지하면서, 해당 파일만 제거하거나, 수정하고 싶은 경우가 있다. 매번 아래 명령을 사용하여 불필요한 파일을 삭제하였으나, 다시 commit 할 경우에 commit message 를 새로 써야해서 불편했다. # git reset --soft HEAD^ # git reset HEAD path/tounwanted_file 또는 파일 수정 # git commit 그런데, 아주 편리한 방법이 있었다. # git reset --soft HEAD^ # git reset .. 2018. 5. 29. 이전 1 다음