Replies: 9 comments 20 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.
-
Facing the same issue. |
Beta Was this translation helpful? Give feedback.
-
Please fix this issue. This heavily impacts productivity of code review whenever it happen. |
Beta Was this translation helpful? Give feedback.
-
Same here. Git can recognize renaming, but github ui showing the same file as deleted/added |
Beta Was this translation helpful? Give feedback.
-
We are also hit by this- really what the .... is going on. git mv file file2
git commit -am "rename file to file2"
echo "changes to file 2" >> file2
git commit -am "Changes to file2"
git push This certainly was not an issue on gitlab. The kicker is if you look at the commit where you rename the file you actually see that it is renamed without changes, looking at the commit where I did the changes to the file for itself also shows this correctly - however in the overview with both commits it suddently is deleted and then created... @spenserblack any comment on that? |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
Hi,
The issue in detail:
test_ceph_s3.js
was recognized now as renamedtest_ceph_s3.js
as added and deleted file.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.
I read here that I should have used git mv (which as you can read above I didn't use...), and maybe it would fix it, but I'm not sure it would work since Git recognized the change of the file as renamed.
Thanks,
Shira
Beta Was this translation helpful? Give feedback.
All reactions