git commit message showing file as 'copied' instead of 'modified'. What are the implications?
strong textgit status shows file as modified, however when commiting it shows the file as been copied ie:
git status
modified: foo/bar/baz开发者_如何转开发.xmlgit commit
copied: bar/foo/baz.xml -> foo/bar/baz.xmlWhy is it showing this file as copied if it was not. The two files were identical before the change.
git tracks content, not files. if two files are the same (or very much the same) git recognizes them as copied. there shouldn't be any implications from this
in your case both files were identical (100 %), so git has no possibility to know if the file was copied, or just accidentally happened to be the same.
don't worry, git only stores snapshots of the tree to the repository. you can control copy and rename detection for git log
with parameters -C
and -M
, git will then try harder to find renames/copies
精彩评论