Git - Reset (soft, mixed, hard) Vs. Checkout Vs. Commit

preview_player
Показать описание
This video is part of the "Overcoming Fear Of Git" course:

What happens behind the scenes when we run git reset. How do branches and the HEAD react when we run git reset vs git checkout vs git commit
Рекомендации по теме
Комментарии
Автор

It seems that the descriptions of what various reset --xxxx options are doing are wrong
reset --soft: moves the deleted nodes stuff to staging area (while deleting "extra" nodes)
reset --mixed: moves the deleted nodes stuff to working-area (while deleting "extra" nodes)
reset --hard: moves deleted nodes stuff to garbage (while deleting "extra" nodes)

thanks for the effort to produce this video

ShukyPersky
Автор

One of the best content and course regarding git!

tosheen
Автор

It ended abruptly. May I know where is the continuation of this video?

rickdee
Автор

while researching on google and doing various test locally; git reset ---mixed does not stage the changes automatically from the previously skipped commits but will be included in the working directory while git reset --soft stage the changes automatically. Please correct if mistaken.

fnfal
Автор

In 0:32, you said "git checkout branch or commit" moves the HEAD without the branch. I know that this is true for "git checkout commit" and that is why we get a detached HEAD warning. If you you said is also true for "git checkout branch_name", then why when we switch branches, we don't get a detached HEAD warning?

usefulknowledge