I want to change date of 4 commits that I pushed to github today, say pushing them back by 3 dates.
I have 2 problems, and it seems that they are relevant:
Is there anyway I can fix this?
You should use a git rebase -i --committer-date-is-author-date --ignore-date
(with Git 2.29+, Q4 2020 ) when changing your date .
If not, the committer date would be today (IE, by default, the date when the rebase was done).
Or you can also use git filter-repo
, as in this example , except the code would need (as in this gist )
commit.author_date = commit.committer_date = new_date.encode('utf-8')
Meaning filter-repo needs, in its callback, to change the author and committer date.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.