git status shows rename but it's incorrect

前端 未结 1 898
南旧
南旧 2020-12-19 16:59

I use Rails to develop. I have a controller named cpc_admin_controller.rb the full path is app/controllers/cpc_admin_controller.rb, and a helper na

相关标签:
1条回答
  • 2020-12-19 17:30

    As illustrated in this thread

    Git doesn't care about individual files or renames, it tracks whole trees.
    What it shows as a rename is just its best guess based on the contents of the two files.

    Git status does perform rename detection using a heuristic.
    But once you commit, you will see the two files are kept separate.

    0 讨论(0)
提交回复
热议问题