How can one change the timestamp of an old commit in Git?

You can do an interactive rebase and choose edit for the commit whose date you would like to alter. When the rebase process stops for amending the commit you type in for instance: git commit –amend –date=”Wed Feb 16 14:00 2011 +0100″ –no-edit P.S. –date=now will use the current time. Afterward, you continue your interactive … Read more

How do I change the author and committer name/email for multiple commits?

NOTE: This answer changes SHA1s, so take care when using it on a branch that has already been pushed. If you only want to fix the spelling of a name or update an old email, Git lets you do this without rewriting history using .mailmap. See my other answer. Using Rebase First, if you haven’t … Read more

How do I modify a specific commit?

Use git rebase. For example, to modify commit bbc643cd, run: $ git rebase –interactive ‘bbc643cd^’ Please note the caret ^ at the end of the command, because you need actually to rebase back to the commit before the one you wish to modify. In the default editor, modify pick to edit in the line mentioning … Read more

How to modify existing, unpushed commit messages?

Amending the most recent commit message git commit –amend will open your editor, allowing you to change the commit message of the most recent commit. Additionally, you can set the commit message directly in the command line with: git commit –amend -m “New commit message” …however, this can make multi-line commit messages or small corrections … Read more