TIL Git can do this without a shell script. I’ve been manually sorting through branches like an idiot