-
Notifications
You must be signed in to change notification settings - Fork 907
Closed
Description
Hello everyone,
I have a use case in where a fork from a public repo needs to be pushed into a private repo, but with a certain string inside the commit message, lets say, APRED101. I've managed to re write the git history using filter-repo as:
$ git-filter-repo --preserve-commit-hashes --source <path to local-public repo> --commit-callback ../commit-message-callback.py --refs HEADInside file commit-message-callback.py I've put:
msg = commit.message.decode("utf-8")
newmsg = "APRED101: " + msg
commit.message = newmsg.encode("utf-8")In this use case, I need to also maintain the history of the original public repo, so in the future I can pull updates. I was wondering to use --preserve-commit-hashes to actually keep the original commit sha1 and thus, accomplish this requirement. But this is not working as I expect, since the outcome history has all the messages with new messages, but with different commit sha1.
Is this the expected use to --preserve-commit-hashes?
Regards,
Agustin
Metadata
Metadata
Assignees
Labels
No labels