Skip to main content

Module checkout

Module checkout 

Source
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§

CheckoutOutcome
Result of checkout.
RestoreOutcome
Summary of files changed on disk by a restore operation.
RevertOutcome
Result of revert.
SwitchOutcome
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.