1

我是 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>...]'

有没有一种简单的方法来做我想要实现的目标?

4

0 回答 0