Skip to content

Instantly share code, notes, and snippets.

@leechunhoe
Last active April 10, 2022 04:54
Show Gist options
  • Select an option

  • Save leechunhoe/e3a3cfdbee94ea3d7eaceafade57f443 to your computer and use it in GitHub Desktop.

Select an option

Save leechunhoe/e3a3cfdbee94ea3d7eaceafade57f443 to your computer and use it in GitHub Desktop.
# Get my own git branches
keyword="$(git config user.name) refs\/heads\/"
git for-each-ref --format=' %(authorname) %(refname)' --sort=authorname | grep $keyword | sed "s/$(echo $keyword)//g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment