I want to revert all commits by a specific author since 4 days ago. How do I do it?
To get all sha1s (with a bit of noise) I can use this:
git log --author=Mohsen --pretty=one --since=4.days
I want to revert all commits by a specific author since 4 days ago. How do I do it?
To get all sha1s (with a bit of noise) I can use this:
git log --author=Mohsen --pretty=one --since=4.days
You have to give
format:%H
togit log
and use a loop:This will create one commit per revert. Suppress the
--no-edit
option to modify interactively the commit message on each revert.Or, if you want to make one big revert commit: