git: reset
a few notes for myself in regards to what is said in the title
-
head
-
index
-
working tree
soft reset
git reset --soft <commit-name>
simply moves head to <commit-name>
, index and working tree are intact.
this one is same as:
git commit --ammend
mixed reset
git reset --mixed <commit-name>
updates index with whatever <commit-name>
head points to, working tree
is intact.
hard reset
git reset --hard <commit-name>
updates head, index and working tree w/ whatever <commit-name>
head
points to.