[git] git reset에 대한 나름의 이해
2023. 10. 20. 14:53ㆍgit
git reset은 hard, mixed, soft가 있다.
처음 상태
hard의 경우 commit 기록을 이전으로 돌리고 현재 파일도 커밋 이전으로 돌린다.
mixed의 경우 아직 commit기록을 commit하기 전으로 돌리되 현재 파일은 커밋 이후와 같다. 그리고 스테이징이 되지 않은 상태이다.
soft의 경우 commit 기록을 이전으로 돌리되 현재 파일은 커밋 이후와 같다. mixed와의 차이는 스테이징이 된 상태이다.
Reference
https://da-nyee.github.io/posts/git-git-reset-git-reflog/
'git' 카테고리의 다른 글
[git] git 스테이징 되지 않은 파일 되돌리기 (0) | 2023.11.12 |
---|---|
[git] git clone repo명을 가진 dir 말고 하위 폴더부터 가지고 오기 (0) | 2023.10.16 |
[git] git branch 정보 받아오기 (0) | 2023.07.21 |
[git] git remote 삭제 (0) | 2023.05.08 |
[git] git 정리 (0) | 2023.04.04 |