diff options
authorIan Jackson <>2018-08-24 21:31:49 +0100
committerIan Jackson <>2018-08-24 21:31:49 +0100
commit45abe880e0efbdc3834168f4fd384678e1c30a51 (patch)
parent50b6d1fa7bd440dcc7ef9d1803aa8e71e388361f (diff)
git-debrebase: forget-was-ever-debrebase: New subcommand
Signed-off-by: Ian Jackson <>
2 files changed, 26 insertions, 0 deletions
diff --git a/git-debrebase b/git-debrebase
index 5fabfd6..c353111 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -2838,6 +2838,18 @@ END
+sub cmd_forget_was_ever_debrebase () {
+ badusage "forget-was-ever-debrebase takes no further arguments" if @ARGV;
+ my ($ffqstatus, $ffq_msg, $current, $ffq_prev, $gdrlast) =
+ ffq_prev_branchinfo();
+ fail "Not suitable for recording git-debrebaseness anyway: $ffq_msg"
+ if defined $ffq_msg;
+ push @deferred_updates, "delete $ffq_prev";
+ push @deferred_updates, "delete $gdrlast";
+ snags_maybe_bail();
+ run_deferred_updates "forget-was-ever-debrebase";
sub cmd_record_resolved_merge () {
badusage "record-resolved-merge takes no further arguments" if @ARGV;
# MERGE-TODO needs documentation
diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod
index 7ad1ab9..1156825 100644
--- a/git-debrebase.1.pod
+++ b/git-debrebase.1.pod
@@ -422,6 +422,20 @@ and it should not be necessary.
+=item git-debrebase forget-was-ever-debrebase
+Deletes the ffq-prev and debrebase-last refs
+associated with this branch,
+that git-debrebase and dgit use to determine
+whether this branch is managed by git-debrebase,
+and what previous head may need to be stitched back in.
+This can be useful if you were just playing with git-debrebase,
+and have used git-reset --hard to go back to a commit
+before your experiments.
+Do not use this if you expect to run git-debrebase on the branch again.
=head1 OPTIONS