Skip to content

Instantly share code, notes, and snippets.

@kblok
Created February 8, 2016 20:14
Show Gist options
  • Select an option

  • Save kblok/93e83c9b7dc217c418d9 to your computer and use it in GitHub Desktop.

Select an option

Save kblok/93e83c9b7dc217c418d9 to your computer and use it in GitHub Desktop.
Check for merged remote branches
#!/bin/bash
git fetch origin
git checkout develop
git pull upstream develop
git branch -r --merged develop | grep -v "origin/master$" | grep -v "origin/develop$" | grep "origin/*" | sed 's/\s*origin\///'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment