git-checkout vs. git-reset vs. git-restore
This note compares the differences between the default actions of git-checkout
, git-reset
and git-restore
.
¶git-checkout[1]
1 | restore hello.c from `HEAD` for both the index and the working tree |
¶git-reset[2]
1 | restore hello.c from `HEAD` for the index |
¶git-restore[3]
1 | restore hello.c from the index for the working tree |