Skip to content

Instantly share code, notes, and snippets.

@SathyaBhat
Created January 11, 2017 13:04
Show Gist options
  • Save SathyaBhat/04bccf6b5255b372adf179f3f31cf890 to your computer and use it in GitHub Desktop.
Save SathyaBhat/04bccf6b5255b372adf179f3f31cf890 to your computer and use it in GitHub Desktop.
Get a list of all branches from a repository
#! /bin/bash
#Replace {GIT_URL} with your repo
git ls-remote --heads {GIT_URL} | aws -F" " '{print $NF}' | cut -c12- -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment