As everyone knows, git checkout
is a very overloaded command. And I do understand that certain commands got introduced to distribute, e.g. to git switch
.
Before I used the following commands:
$ git checkout <existing-branch>
$ git checkout <hash>
$ git checkout -b <new-branch-name>
So I am wondering after git switch
got introduced, what is the left purpose of git-checkout
? Is this a deprecated command?
git-checkout
can also be used to restore working-tree files. (Edit: seems that you can usegit-restore
for that) – Micagit switch
, but not whats left behind – Hexamethylenetetraminegit checkout
command still does everything it did before, of course. :-) Actually, it's been improved: the bad behavior it used to have, destroying work, now comes out as a complaint that the command is ambiguous. (switch and restore don't have this issue.) – Acetone