Expand description
Working-tree mutation: checkout, switch and revert.
All three share a single, conservative restore engine that never deletes
untracked files and never overwrites a locally modified file without
--force.
Structs§
- Checkout
Outcome - Result of
checkout. - Restore
Outcome - Summary of files changed on disk by a restore operation.
- Revert
Outcome - Result of
revert. - Switch
Outcome - Result of
switch.
Functions§
- checkout
- Restore the working tree to a revision without moving the current branch (a “restore-like” checkout). HEAD stays attached to its branch.
- revert
- Revert HEAD: create a new commit that restores the state of HEAD’s parent.
- switch
- Switch HEAD to another branch, restoring its files. Refuses a dirty working
tree unless
force.