We are fixing our repository problem with differently cased path for some files - first folder in path was "Application" for one set of files and "application" for another set of files. To achieve this we rename all files to uppercases "Application" in all branches and reclone whole repository.
When we try to merge one branch into another, for many files we see that:
CONFLICT (rename/delete):
Applications/Views/sell.cshtml deleted in HEAD and renamed in feature123_branch.
Version feature123_branch of Applications/Views/sell.cshtml left in tree.
Mergetool give an option to delete file on use renamed file.
But this file is only renamed both in HEAD and feature123_branch, for example github.com shows that
file renamed from {applications/ → Applications/}/Views/sell.cshtml for all commits.
We can use "resolve" merge stategy and file will be marked "both renamed" correctly, but we don't what to lose file history (according to our git guru cares).
Here is a questions:
How can we see real history of file with git command (same to github commit history) showing that file was renamed?
Why merge with default "recursive" strategy thinks that this file not renamed but deleted in branch?
If we will use resolve strategy will file history lost?
p.s. Repo is private so i can't give a link, sorry.
That's an old one, but regarding:
How can we see real history of file with git command (same to github commit history) showing that file was renamed?
git log has a --follow option:
--follow - Continue listing the history of a file beyond renames (works only for a single file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With