在从svn到git的复制/重命名之前保留修订历史记录

4
1个回答

1

Git不会显式地存储有关副本的信息,因此它并不取决于您如何导入它,如果您想要检测到它们,则必须在执行日志命令时告诉它。从git-log手册页面:

-C[<n>]
--find-copies[=<n>]
Detect copies as well as renames. See also --find-copies-harder. If n is specified, 
it has the same meaning as for -M<n>.

--find-copies-harder
For performance reasons, by default, -C option finds copies only if the original file
of the copy was modified in the same changeset. This flag makes the command inspect 
unmodified files as candidates for the source of copy. This is a very expensive 
operation for large projects, so use it with caution. Giving more than one -C option
has the same effect.

感谢您的日志提示 - 不幸的是,它似乎并没有起作用。也许是因为复制它的位置未被包含(也不会被)在Git存储库中? - shauns
是的,不幸的是,复制品必须像你猜测的一样在git存储库中。 - Karl Bielefeldt

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接