Git rename but GitHub shows it as added file and deleted file #43177
-
Select Topic AreaBug BodyHi,
Note: this was not the only file that I moved and renamed in this PR, all the other file was recognized as renamed in Git and also in GitHub. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 15 replies
-
try using the git mv command to explicitly rename the file, rather than simply moving it in the file system. This will help Git track the file's history more accurately. |
Beta Was this translation helpful? Give feedback.
-
Git is very good about detecting when files are renamed, and as you described it did for you. I assume this is simply a limitation of the GitHub UI. |
Beta Was this translation helpful? Give feedback.
-
Just curious, were you using Windows when you did this? Git on Windows can automatically convert line endings depending on settings, so perhaps the commit tracks different line endings than the original file had. |
Beta Was this translation helpful? Give feedback.
-
Hi
|
Beta Was this translation helpful? Give feedback.
Just curious, were you using Windows when you did this? Git on Windows can automatically convert line endings depending on settings, so perhaps the commit tracks different line endings than the original file had.