How to delete all Commits by author on GitHub Local and Remote branch?

Viewed 69

One of the user wrongly updated commits for last 3 months (don't have the exact date). Want to delete all his commits by the author name in single branch .

git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "Roman" ];
then
        skip_commit "$@";
else
        git commit-tree "$@";
fi' HEAD

It's not working, please also share the way to make the changes on remote as well.

Branch name : development
Author name : Roman
Commits : 750

Thanks

0 Answers
Related