commitdog revert lets you undo a recent commit safely. Rather than rewriting history, it creates a new revert commit that reverses the changes from the commit you select. You pick from the five most recent commits in an interactive list, confirm, and commitdog handles the rest — including prompting you to push afterward. If a revert is already in progress (due to conflicts from a previous run), commitdog detects it and lets you continue or abort.
Usage
Revert flow
1
Stash unstaged changes (if needed)
If your working tree has local modifications, commitdog offers to stash them before reverting so the operation starts from a clean state:The stash is popped automatically after the revert completes.
2
Pick a commit to revert
commitdog lists the five most recent commits with their short hash, subject, and relative date:Enter a number to select that commit,
e to type a commit hash manually (7–40 hex characters), or q to abort.3
Confirm the revert
commitdog shows which commit you are about to revert and asks for confirmation:Press Enter or
y to proceed.4
Revert commit is created
commitdog runs the revert and confirms:It then asks whether to push the revert commit:
Merge commit handling
If you select a merge commit, commitdog asks which parent to revert to:1 to undo the merge entirely (the most common choice) or 2 to revert to the state of the branch that was merged in.
Conflict handling
If the revert produces conflicts, commitdog exits with instructions:commitdog revert while a revert is in progress, commitdog detects the state and offers to continue or abort: