Skip to content

Instantly share code, notes, and snippets.

View digitalseraph's full-sized avatar

David Miller digitalseraph

View GitHub Profile
@digitalseraph
digitalseraph / find-old-branches.sh
Created November 11, 2020 21:58 — forked from mroderick/find-old-branches.sh
A small script to find stale branches
#!/bin/bash
# This is a very naive script, it doesn't do grouping and returns all branches
# I only really care about branches that have not seen commits in two months
#
# I am hoping to find some time to write a tool that can output these reports for me
# In the meantime, I am using this
echo "Merged branches"
for branch in `git branch -r --merged | grep -v HEAD`;do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch; done | sort -r

Keybase proof

I hereby claim:

  • I am digitalseraph on github.