I\'d like to run git filter-branch on all children of a given commit. This doesn\'t seem to be an easy task, since there doesn\'t appear to be a way to tell
Show the ancestry paths to commit A from a set of others:
git log
--ancestry-path^Aothers
Show all the unreachable commits in the repo:
git fsck
--unreachable --no-reflogs \
| awk '$2 == "commit" {print $3}'
Trace all descendants of commit A anywhere in the repo:
git log --ancestry-path --graph --decorate --oneline ^A \
--all $(git fsck --unreachable --no-reflogs | awk '$2=="commit" {print $3}')
Show all references whose history includes a commit:
git log --ancestry-path --graph --simplify-by-decoration --oneline --all ^A
# and in case A might have a direct ref, add:
git log --ancestry-path --graph --simplify-by-decoration --oneline A^!
edit: correction: don't show unwanted commits when A itself has parents with other children.