Skip to content

Commit 7aef0bf

Browse files
committed
📝 Add installation of git-filter-repo
1 parent 020540a commit 7aef0bf

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/productive/git/undo.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,17 +284,23 @@ With this SHA, the commit can now be restored with :doc:`advanced/cherry-pick`:
284284
Remove a file from the history
285285
------------------------------
286286

287-
A file can be completely removed from the current branches Git history.
288-
This could be necessary if you accidentally committed passwords or huge files:
287+
A file can be completely removed from the current branches Git history. This is
288+
necessary if, for example, you have accidentally added passwords or a very large
289+
file to the repository.
290+
291+
To do this, you need to install `git-filter-repo
292+
<https://github.com/newren/git-filter-repo>`_, for example with ``uv add
293+
git-filter-repo``. Then you can delete your file, for example with
294+
:samp:`{PATH/SOMEFILE}`:
289295

290296
.. code-block:: console
291297
292-
$ git filter-repo --invert-paths --path path/somefile
293-
$ git push --no-verify --mirror
298+
$ git filter-repo --invert-paths --path PATH/SOMEFILE
299+
$ git push --no-verify --mirror
294300
295301
.. note::
296-
Inform the team members that they should create a clone of the
297-
repository again.
302+
Inform the team members that they should create a clone of the repository
303+
again.
298304

299305
Remove a string from the history
300306
--------------------------------

0 commit comments

Comments
 (0)