Skip to content

Instantly share code, notes, and snippets.

@prestonvanloon
Created July 22, 2018 01:04
Show Gist options
  • Save prestonvanloon/8d7fba303ba7f74f8ff20de7ba467ad8 to your computer and use it in GitHub Desktop.
Save prestonvanloon/8d7fba303ba7f74f8ff20de7ba467ad8 to your computer and use it in GitHub Desktop.
How geth-sharding was pruned of all geth commits
git filter-branch --commit-filter '
if echo $GIT_AUTHOR_NAME | grep -F -f /tmp/list >/dev/null;
then
git commit-tree "$@";
else
skip_commit "$@";
fi' HEAD
# Verify the list of authors
git shortlog -sn
# If any are still present (i.e. anyone that had a partial match)
# then remove these individually
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "Elias Naur" ];
then
skip_commit "$@";
else
git commit-tree "$@";
fi' HEAD
Raul Jordan
Terence Tsao
Preston Van Loon
nisdas
Fynn
Eli
Yutaro Mori
Nishant Das
Kushagra Sharma
The Gitter Badger
Mike Rowehl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment