Created
May 11, 2022 08:34
-
-
Save olive42/27cf0408a8330b992d73bb1d5f5280c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Iterate through Git directories and display their branch | |
# Use-case: check if we are all on master or not | |
function showcurrentbranch () { | |
find ${1:-.} -type d -path '*/.git' -printf '%h\n' -prune | xargs -I{} zsh -c \ | |
"echo {} ; pushd {} && git branch --show-current ; popd" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment