Skip to content

Commit 8abf8fa

Browse files
committed
git-filter-repo.txt: be more forceful on the wording of --force
Online blogs/articles/Q&A as well as direct feedback suggests that people use the --force flag rather cavalierly. Add words like "irreversible" and "immediate pruning" to discourage such blithe application of this flag. I hope this encourages folks to either learn the ramifications of irreversible full-repository entire history rewrites first, or to follow the recommendation of only operating on a fresh clone. Signed-off-by: Elijah Newren <[email protected]>
1 parent f8c14d1 commit 8abf8fa

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Documentation/git-filter-repo.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,12 @@ Miscellaneous options
296296

297297
--force::
298298
-f::
299-
Rewrite history even if the current repo does not look like a
300-
fresh clone. See <<FRESHCLONE>>. Note that when cloning
301-
repos on a local filesystem, it is better to pass `--no-local`
302-
to git clone than passing `--force` to git-filter-repo.
299+
Ignore fresh clone checks and rewrite history (an irreversible
300+
operation, especially since it by default ends with an
301+
immediate pruning of reflogs and old objects). See
302+
<<FRESHCLONE>>. Note that when cloning repos on a local
303+
filesystem, it is better to pass `--no-local` to git clone
304+
than passing `--force` to git-filter-repo.
303305

304306
--partial::
305307
Do a partial history rewrite, resulting in the mixture of old and

git-filter-repo

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,8 +1956,10 @@ EXAMPLES
19561956
misc.add_argument('--version', action='store_true',
19571957
help=_("Display filter-repo's version and exit."))
19581958
misc.add_argument('--force', '-f', action='store_true',
1959-
help=_("Rewrite history even if the current repo does not look "
1960-
"like a fresh clone."))
1959+
help=_("Rewrite repository history even if the current repo does not "
1960+
"look like a fresh clone. History rewriting is irreversible "
1961+
"(and includes immediate pruning of reflogs and old objects), "
1962+
"so be cautious about using this flag."))
19611963
misc.add_argument('--partial', action='store_true',
19621964
help=_("Do a partial history rewrite, resulting in the mixture of "
19631965
"old and new history. This implies a default of "

0 commit comments

Comments
 (0)