rm
Remove a change from the repository permanently.
This is a destructive operation that cannot be undone. Use with caution!
By default, this command removes:
- The specified change
- All child changes (recursively)
- All associated file data
With —keep-children flag:
- Only removes the specified change
- Reconnects children to the removed change’s parent(s)
- Preserves the rest of the history tree
You cannot remove:
- The change you’re currently working on
- Changes that have bookmarks pointing to them
- The root change of the repository
This command is useful for:
- Cleaning up experimental branches that didn’t work out
- Removing accidentally created changes
- Pruning unnecessary history before archiving
pogo rm
--keep-children
: Only remove the specified change and move its children to its parents
Examples
Section titled “Examples”# Remove a change and all its descendantspogo rm experimental-feature-27
# Remove only the specific change, preserving childrenpogo rm broken-change-15 --keep-children
# Remove a change that was created by mistakepogo rm accidental-branch-3
# Cannot remove bookmarked changespogo rm main # Error: cannot remove bookmarked change