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 would like to rename files and folders in Git, keeping the commit history with the new name.
git filter-repo --path-rename
almost does what I need, except that I'd like have a commit describing the rename.Since
git filter-repo --path-rename
doesn't add such a commit, I thought of first doing thegit filter-repo --path-rename
and then doing agit commit
on the renamed files. However, Git doesn't seem to (as far I can tell) allow me to stage unchanged files, so I can't really do agit commit
on the renamed files.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
git filter-repo --path-rename
add a commit describing the rename?Beta Was this translation helpful? Give feedback.
All reactions