S
S
spaceatmoon2021-10-11 13:45:54
git
spaceatmoon, 2021-10-11 13:45:54

How to change the commit author but keep the time of the previous commit?

I'm trying to do a git rebase. And some commits have the wrong author. I change the author with this command, however the date is set to today, which is wrong in my case.

git rebase -i 3d5ddffb7b5340c -x "git commit --amend --reset-author"


What needs to be added to this command to keep the original commit date?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Loli E1ON, 2021-10-11
@E1ON

--date="Wed Feb 16 14:00 2011 +0100"
or mb
--no-edit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question