Skip to content

Instantly share code, notes, and snippets.

@willb
Created January 7, 2010 21:00
Show Gist options
  • Save willb/271565 to your computer and use it in GitHub Desktop.
Save willb/271565 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Run git-spelunk with one or more pathname arguments from within a
# directory that contains one or more (non-bare) git repositories.
# It will print out all commits in each repository that touch the
# given pathname.
git-spelunk() { for repo in $( find . -name .git -exec dirname '{}' \; ) ; do (cd $repo ; echo ${repo}: ; git log --all --stat -- $*) ; done }
git-spelunk $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment