File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
book/07-git-tools/sections Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ This occurs fairly commonly.
273273Someone accidentally commits a huge binary file with a thoughtless `git add .`, and you want to remove it everywhere.
274274Perhaps you accidentally committed a file that contained a password, and you want to make your project open source.
275275`filter-branch` is the tool you probably want to use to scrub your entire history.
276- To remove a file named passwords.txt from your entire history, you can use the `--tree-filter` option to `filter-branch`:
276+ To remove a file named ` passwords.txt` from your entire history, you can use the `--tree-filter` option to `filter-branch`:
277277
278278[source,console]
279279----
@@ -283,7 +283,7 @@ Ref 'refs/heads/master' was rewritten
283283----
284284
285285The `--tree-filter` option runs the specified command after each checkout of the project and then recommits the results.
286- In this case, you remove a file called passwords.txt from every snapshot, whether it exists or not.
286+ In this case, you remove a file called ` passwords.txt` from every snapshot, whether it exists or not.
287287If you want to remove all accidentally committed editor backup files, you can run something like `git filter-branch --tree-filter 'rm -f *~' HEAD`.
288288
289289You’ll be able to watch Git rewriting trees and commits and then move the branch pointer at the end.
You can’t perform that action at this time.
0 commit comments