-
I would like to rename files and folders in Git, keeping the commit history with the new name. Since I'm going to next try using a filename callback to see it can be used to add a new commit. But I thought I'd also ask if anyone knows how to have |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm afraid I'm not following this description is. If you don't want 500 commits but just want one...where do you put that one? Near the beginning of history? Near the current end of history? Why would someone look there to find it? And what's the purpose of the commit given that after you've rewritten history, |
Beta Was this translation helpful? Give feedback.
I'm afraid I'm not following this description is.
git filter-repo --path-rename A:B
goes through every commit, and for any that has a file named A will rename it to B. So, if you have 10,000 commits in your history, and 500 of them make modifications to file A, then --path-rename fixes up 500 commits. Do you want an additional 500 commits saying that you've renamed A -> B in the history?? Someone reading that would find that really odd.If you don't want 500 commits but just want one...where do you put that one? Near the beginning of history? Near the current end of history? Why would someone look there to find it? And what's the purpose of the commit given that after you've rewritten his…