Skip to content

Instantly share code, notes, and snippets.

@mochsner
Created August 31, 2021 19:29
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 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