Skip to content

Instantly share code, notes, and snippets.

@ariyuan
ariyuan / gist:34e60a5560c0e7640eea34eb832de57e
Created April 15, 2022 02:02 — forked from luisbosque/gist:5513fa88b5087434089d
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