You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git filter-repo --commit-callback 'commit.message = commit.message + b"\n\nOriginal SHA: " + commit.original_id' --force
After this step, I have verified that the commit messages contain the correct SHA strings.
In step 2, I run various commands like:
git filter-repo --path subtree --force
After this step, the "Original SHA" string added to the commit message in step #1 is changed and now wrong.
Is there any way to prevent filter-repo from changing SHA/hash strings in commit messages? I understand that they will be pointing to old SHAs that do not exist in the repo.
Update: I found --preserve-commit-hashes. That worked for me!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My goal is to:
I achieve #1 via the following command:
In step 2, I run various commands like:
After this step, the "Original SHA" string added to the commit message in step #1 is changed and now wrong.
Is there any way to prevent filter-repo from changing SHA/hash strings in commit messages? I understand that they will be pointing to old SHAs that do not exist in the repo.
Update: I found --preserve-commit-hashes. That worked for me!
Beta Was this translation helpful? Give feedback.
All reactions