Skip to content

Instantly share code, notes, and snippets.

@varhub
Created June 9, 2017 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save varhub/ca6dfbceec0db5526d824451132dd951 to your computer and use it in GitHub Desktop.
Save varhub/ca6dfbceec0db5526d824451132dd951 to your computer and use it in GitHub Desktop.
git list_hashes
_pwd=$PWD
find . -name '.git' -type d | while read repo
do
repo_dir=$(dirname $repo)
cd $repo_dir
echo "$(git rev-parse --short HEAD) $(git rev-parse --show-toplevel)"
#echo -e "$(git rev-parse --show-toplevel) \t $(git rev-parse HEAD)"
cd $_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment