如何在执行 Git 平分时忽略目录?
How can I ignore a directory when doing a Git bisect?
我有一个生产构建目录,在合并分支时经常发生冲突。那是一个单独的问题。我需要使用 Git bisect 在提交历史记录中查找问题,但出现以下错误:
Bisecting: a merge base must be tested
error: Untracked working tree file 'problem_directory/filename.ext' would be overwritten by merge.
平分过程中可以忽略problem_directory
吗?
由于您遇到的原因,不应签入构建目录。
考虑将其添加到 .gitignore
并使用 BFG Repo Cleaner 之类的工具将其从历史记录中删除。那么你的二等分就不是问题了。
或者,在测试完成后清理构建目录。如果您使用 git bisect run
,请将 make clean
或等价物放入您的构建系统中的脚本末尾。
我有一个生产构建目录,在合并分支时经常发生冲突。那是一个单独的问题。我需要使用 Git bisect 在提交历史记录中查找问题,但出现以下错误:
Bisecting: a merge base must be tested
error: Untracked working tree file 'problem_directory/filename.ext' would be overwritten by merge.
平分过程中可以忽略problem_directory
吗?
由于您遇到的原因,不应签入构建目录。
考虑将其添加到 .gitignore
并使用 BFG Repo Cleaner 之类的工具将其从历史记录中删除。那么你的二等分就不是问题了。
或者,在测试完成后清理构建目录。如果您使用 git bisect run
,请将 make clean
或等价物放入您的构建系统中的脚本末尾。