Skip to content

Instantly share code, notes, and snippets.

@podrezo
Created December 14, 2021 15:46
Show Gist options
  • Save podrezo/ce01497b50a63ab055fe55ac819b8d7d to your computer and use it in GitHub Desktop.
Save podrezo/ce01497b50a63ab055fe55ac819b8d7d to your computer and use it in GitHub Desktop.
CSV of Remote Branches
#!/bin/bash
echo "\"Branch Name\",\"Last Commit Date\",\"Last Commit Date (ago)\",\"Last Commit By\""
for branch in `git branch -r --merged master | grep -v HEAD`
do
git show --format="\"$branch\",\"%ci\",\"%cr\",\"%an\"" $branch | head -n 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment