我是git的新手,并且因为这项简单任务的复杂性而引以为傲。
我用谷歌搜索了一下,并得出了一些结果,最终说要运行这个命令:
git filter-branch --subdirectory-filter your_dir -- -- all
然而,结果是:
C:\tmp\w2 [master]> git filter-branch --subdirectory-filter IndigoServices -- --all
Usage: git core\git-filter-branch [--env-filter <command>] [--tree-filter <command>]
[--index-filter <command>] [--parent-filter <command>]
[--msg-filter <command>] [--commit-filter <command>]
[--tag-name-filter <command>] [--subdirectory-filter <directory>]
[--original <namespace>] [-d <directory>] [-f | --force]
[<rev-list options>...]
C:\tmp\w2 [master]> git filter-branch --subdirectory-filter IndigoServices -- -- all
fatal: ambiguous argument 'all': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
有没有一种简单的方法可以做我想要实现的目标?