You can mutate the Git data if you chose to using commands like "filter-branch". "filter-branch" isn't used frequently, since it causes issues with every up/down-stream replica if the data has been pushed/pulled, but it is possible. But, even some commonly used commands like "amend", "rebase", and "squash" cause limited data mutations which are broadly considered appropriate and useful.
You are allowed to create a copy (and thus also in printed form) of copyrighted material, _only_ for private and personal use. i.e you _must_ recreate it yourself.
As for selling a modified version, if it isn't modified enough than you still infringe copyright of the original author. With "enough" being something that needs to be defended in court if challenged.
I’m absolutely of this mind, but unfortunately it also depends on developers’ willingness to make use of these hooks, and it’s becoming increasingly uncommon for third party apps to have any integration or automation affordances, especially any specific to any particular platform. It’s become the norm to ship the absolute bare minimum, which is the lowest common denominator “it runs”.