예를 들어 커밋한 index.htm 파일을 rm 명령어로 삭제했다고 합시다.

    infoh@hojin MINGW64 /e/gitstudy04 (master)

    $ git rm --cached index.htm

    rm 'index.htm'

    삭제한 후 status 명령어를 실행하면 다음과 같이 이전과 다른 결과가 나옵니다.

    infoh@hojin MINGW64 /e/gitstudy04 (master)

    $ git status

    On branch master

    Changes to be committed:

    (use "git reset HEAD <file>..." to unstage)

    deleted: index.htm

    Untracked files:

    (use "git add <file>..." to include in what will be committed)

    index.htm 스테이지 삭제

    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.