Skip to content

Instantly share code, notes, and snippets.

@luisbosque
luisbosque / gist:5513fa88b5087434089d
Created August 26, 2015 11:06
Export to csv format the list of remote branches and their "owners"
for i in `git branch -a |grep remotes |awk '{print $1}' | cut -d"/" -f 3,4,5 |grep -v ^master$ |grep -v ^HEAD$`; do echo "`git log -1 --pretty=format:\"%an (%ae)\" origin/$i`|$i"; done |sort > /tmp/branches.csv