Commands
>_
but discard
Discard branches, commits, or changes.
Changes may be selected by branch, commit, committed file, uncommitted file, or uncommitted
hunk CLI ID. Use @ to discard all of the main worktree's uncommitted changes, or omit
<CHANGES> to discard those of the checkout but runs in.
All provided changes must be the same kind. Committed files must come from the same commit.
The entire operation is recorded as a single oplog entry, so it can be undone with but undo.
For more details about CLI IDs, see but help cli-ids.
Usage: but discard [CHANGES]
Arguments
<CHANGES>— One or more branches, commits, or changes to discard.
If omitted, all uncommitted changes of the checkout but runs in are discarded.
Last updated on