Skip to content

Instantly share code, notes, and snippets.

@behrangsa
Created August 29, 2014 01: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 behrangsa/0aba517163546409d733 to your computer and use it in GitHub Desktop.
Save behrangsa/0aba517163546409d733 to your computer and use it in GitHub Desktop.
Git Branches
for proj in ~/Projects/* ; do
if [[ -d "$proj" && -d "$proj/.git" ]]; then
echo -n "$proj: "
cd $proj && git branch | sed -n '/\* /s///p'
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment