Skip to content

Instantly share code, notes, and snippets.

@snoby
Created May 24, 2016 14:21
Show Gist options
  • Save snoby/7ffbdda69fff991575b11cb71c9aeb8b to your computer and use it in GitHub Desktop.
Save snoby/7ffbdda69fff991575b11cb71c9aeb8b to your computer and use it in GitHub Desktop.
unpushed but committed changes in all branches
alias git-list-unpushed='git for-each-ref --format "%(refname)" | grep "refs/remotes" | sed "s@refs/remotes/@@" | while read branch; do echo "$branch"; git cherry -v "$branch" "${branch/origin\//}"; done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment