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
Is it possible to edit a commit's metadata (author, committer etc) using only a Commmit object?
I see that we can get a list of commit instances that reflect the history of a target branch, but could I change the attributes of those instances (e.g. the author attribute) and have the changes be applied to the repository (on the fly, or using some kind of repo.commit() function)?
The git commit history is immutable and thus append-only. Adjusting anything requires rewriting parts of the history.
This can be done easiest using git rebase -i or git-filter-branch. Equivalent functionality could be implemented in GitPython, but it's certainly very close to the 'metal'.
Even though this issue is closed, please feel free to add further comments or remarks.
Activity
Byron commentedon Feb 8, 2020
The git commit history is immutable and thus append-only. Adjusting anything requires rewriting parts of the history.
This can be done easiest using
git rebase -iorgit-filter-branch. Equivalent functionality could be implemented in GitPython, but it's certainly very close to the 'metal'.Even though this issue is closed, please feel free to add further comments or remarks.