aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-15 13:50:15 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-15 13:50:15 -0700
commit03633a288cfca11f94839472fe19ba15f634a2f8 (patch)
tree6761bb3f2e78014c0b360e75a36eb64fb129ab89 /Documentation
parentMerge branch 'ps/object-wo-the-repository' (diff)
parentreflog: implement subcommand to drop reflogs (diff)
downloadgit-03633a288cfca11f94839472fe19ba15f634a2f8.tar.gz
git-03633a288cfca11f94839472fe19ba15f634a2f8.zip
Merge branch 'kn/reflog-drop'
"git reflog" learns "drop" subcommand, that discards the entire reflog data for a ref. * kn/reflog-drop: reflog: implement subcommand to drop reflogs reflog: improve error for when reflog is not found
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-reflog.adoc23
1 files changed, 19 insertions, 4 deletions
diff --git a/Documentation/git-reflog.adoc b/Documentation/git-reflog.adoc
index a929c52982..b55c060569 100644
--- a/Documentation/git-reflog.adoc
+++ b/Documentation/git-reflog.adoc
@@ -16,6 +16,7 @@ SYNOPSIS
[--dry-run | -n] [--verbose] [--all [--single-worktree] | <refs>...]
'git reflog delete' [--rewrite] [--updateref]
[--dry-run | -n] [--verbose] <ref>@{<specifier>}...
+'git reflog drop' [--all [--single-worktree] | <refs>...]
'git reflog exists' <ref>
DESCRIPTION
@@ -48,10 +49,14 @@ and not reachable from the current tip, are removed from the reflog.
This is typically not used directly by end users -- instead, see
linkgit:git-gc[1].
-The "delete" subcommand deletes single entries from the reflog. Its
-argument must be an _exact_ entry (e.g. "`git reflog delete
-master@{2}`"). This subcommand is also typically not used directly by
-end users.
+The "delete" subcommand deletes single entries from the reflog, but
+not the reflog itself. Its argument must be an _exact_ entry (e.g. "`git
+reflog delete master@{2}`"). This subcommand is also typically not used
+directly by end users.
+
+The "drop" subcommand completely removes the reflog for the specified
+references. This is in contrast to "expire" and "delete", both of which
+can be used to delete reflog entries, but not the reflog itself.
The "exists" subcommand checks whether a ref has a reflog. It exits
with zero status if the reflog exists, and non-zero status if it does
@@ -132,6 +137,16 @@ Options for `delete`
`--dry-run`, and `--verbose`, with the same meanings as when they are
used with `expire`.
+Options for `drop`
+~~~~~~~~~~~~~~~~~~~~
+
+--all::
+ Drop the reflogs of all references from all worktrees.
+
+--single-worktree::
+ By default when `--all` is specified, reflogs from all working
+ trees are dropped. This option limits the processing to reflogs
+ from the current working tree only.
GIT
---