Purpose: Filter a fast-import stream to include/exclude files & directories. Usage: bzr fast-import-filter SOURCE Options: -x ARG, --excludes=ARG Exclude these files from commits. -i ARG, --includes=ARG Only include commits affecting these files. Directories should have a trailing /. -v, --verbose Display more information. -q, --quiet Only display errors and warnings. -h, --help Show help message. Description: This command is useful for splitting a subdirectory or bunch of files out from a project to create a new project complete with history for just those files. It can also be used to create a new project repository that removes all references to files that should not have been committed, e.g. security-related information (like passwords), commercially sensitive material, files with an incompatible license or large binary files like CD images. When filtering out a subdirectory (or file), the new stream uses the subdirectory (or subdirectory containing the file) as the root. As fast-import doesn't know in advance whether a path is a file or directory in the stream, you need to specify a trailing '/' on directories passed to the --includes option. If multiple files or directories are given, the new root is the deepest common directory. To specify standard input as the input stream, use a source name of '-'. Note: If a path has been renamed, take care to specify the *original* path name, not the final name that it ends up with. Examples: Create a new project from a library. (Note the trailing / on the directory name of the library.) front-end | bzr fast-import-filter -i lib/xxx/ > xxx.fi bzr init-repo mylibrary cd mylibrary bzr fast-import ../xxx.fi (lib/xxx/foo is now foo) Create a new repository without a sensitive file. front-end | bzr fast-import-filter -x missile-codes.txt > clean.fi bzr init-repo project.clean cd project.clean bzr fast-import ../clean.fi From: plugin "fastimport" See also: fast-import