-
-
Notifications
You must be signed in to change notification settings - Fork 954
-
Hi!
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)?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
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.
Replies: 1 comment
-
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.
Beta Was this translation helpful? Give feedback.