File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -284,17 +284,23 @@ With this SHA, the commit can now be restored with :doc:`advanced/cherry-pick`:
284284Remove 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
299305Remove a string from the history
300306--------------------------------
You can’t perform that action at this time.
0 commit comments