본문 바로가기
프로그래밍

git 작업 되돌리기

by 두꺼비사장 2023. 4. 9.
728x90

- 작업 트리에서 수정한 파일 되돌리기 - git checkout --파일이름

   git checkout -- hello.txt

 

- staging 에서 되돌리기 - git reset HEAD 파일 이름

  git reset HEAD hello.txt

 

- 최신 commit 되돌리기- git reset HEAD^

  git reset HEAD^