Skip to content

Instantly share code, notes, and snippets.

@mochsner
Created August 31, 2021 19:29
Show Gist options
  • Save mochsner/23f5aa87481099aff603927b4dc8832b to your computer and use it in GitHub Desktop.
Save mochsner/23f5aa87481099aff603927b4dc8832b to your computer and use it in GitHub Desktop.
Git Bash: Get Branch of All Subdirs
# Taken from: https://stackoverflow.com/questions/49281685/
for i in */; do \
(cd $i && echo -n "${i}: " && git rev-parse --abbrev-ref HEAD); \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment