동그라미 위에는 새로 커밋한 파일
동그라미 안에는 커밋해시
$ git reset c2
$ git status
On branch s1
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: c2.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
s1.txt
no changes added to commit (use "git add" and/or "git commit -a")
이딴식으로 c2가 삭제됬다고 나오는데
원래 reset하면 head를 해당커밋으로 이동하는거라서 s1이 삭제되고 c1, c2가 남아있는게 맞지않음?
그건 hard reset을 했을 때
그럼 지금 리셋한건 내용이 머임?
mixed reset을 하면 working tree는 그대로 남고 HEAD와 staging area가 해당 revision으로 바뀜
오 고맙습니다
님아 그럼 mixed reset한 이후에 작업 내용 날리려면어떻게하나여
checkout -- 쓰니까 되네요 감사합니다
근데 checkout --위험하다고 쓰지말라는데 되돌리고싶으면 어캐해여