@@ -326,7 +326,7 @@ <h2>SYNOPSIS</h2>
326326 [--msg-filter <command>] [--commit-filter <command>]
327327 [--tag-name-filter <command>] [--subdirectory-filter <directory>]
328328 [--original <namespace>] [-d <directory>] [-f | --force]
329- [<rev-list options>…]</ div > </ div >
329+ [--] [ <rev-list options>…]</ div > </ div >
330330</ div >
331331< h2 id ="_description "> DESCRIPTION</ h2 >
332332< div class ="sectionbody ">
@@ -528,10 +528,10 @@ <h2 id="_options">OPTIONS</h2>
528528</ dt >
529529< dd >
530530< p >
531- When options are given after the new branch name, they will
532- be passed to < em > git-rev-list </ em > . Only commits in the resulting
533- output will be filtered, although the filtered commits can still
534- reference parents which are outside of that set .
531+ Arguments for < em > git-rev-list </ em > . All positive refs included by
532+ these options are rewritten . You may also specify options
533+ such as < em > --all </ em > , but you must use < em > -- </ em > to separate them from
534+ the < em > git-filter-branch </ em > options .
535535</ p >
536536</ dd >
537537</ dl > </ div >
@@ -553,6 +553,15 @@ <h2 id="_examples">Examples</h2>
553553< pre > < tt > git filter-branch --index-filter 'git rm --cached filename' HEAD</ tt > </ pre >
554554</ div > </ div >
555555< div class ="para "> < p > Now, you will get the rewritten history saved in HEAD.</ p > </ div >
556+ < div class ="para "> < p > To rewrite the repository to look as if < tt > foodir/</ tt > had been its project
557+ root, and discard all other history:</ p > </ div >
558+ < div class ="listingblock ">
559+ < div class ="content ">
560+ < pre > < tt > git filter-branch --subdirectory-filter foodir -- --all</ tt > </ pre >
561+ </ div > </ div >
562+ < div class ="para "> < p > Thus you can, e.g., turn a library subdirectory into a repository of
563+ its own. Note the < tt > --</ tt > that separates < em > filter-branch</ em > options from
564+ revision options, and the < tt > --all</ tt > to rewrite all branches and tags.</ p > </ div >
556565< div class ="para "> < p > To set a commit (which typically is at the tip of another
557566history) to be the parent of the current initial commit, in
558567order to paste the other history behind the current history:</ p > </ div >
@@ -665,7 +674,7 @@ <h2 id="_git">GIT</h2>
665674</ div >
666675< div id ="footer ">
667676< div id ="footer-text ">
668- Last updated 2008-07-31 22:10:18 UTC
677+ Last updated 2008-08-10 03:55:19 UTC
669678</ div >
670679</ div >
671680</ body >
0 commit comments