TIL #87 : [Git] Git unstage

셀레스틴 허·2021년 3월 6일
0
post-thumbnail

unstage?

git add 취소하기 : 파일을 Unstage로 변경하기

remote에 올라가면 안되는 파일을 add 했고, 그 때 바로 삭제하거나 파일을 옮기지 않고 바로 .gitignore에 추가해, git status에서 delete이라고도 안 뜨며 행방불명된 상태일 때 쓴 방법

  1. 명령어 : git reset HEAD "FILE_NAME"

  2. 다시 git status 쳐 보면 없어진 것을 확인할 수 있다.

  3. 바로 commit 진행하면 된다.

Reference:
https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html

profile
Software Developer / 고통은 필연, 괴로움은 선택

0개의 댓글