Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Last active July 28, 2017 19:45
Show Gist options
  • Save matschaffer/6aa05788b8b9291adeb8 to your computer and use it in GitHub Desktop.
Save matschaffer/6aa05788b8b9291adeb8 to your computer and use it in GitHub Desktop.
[alias]
outdated = "!f() { bash -c 'diff -u <(git branch --no-merged master) <(git branch --contains master) | egrep \"^- \"'; }; f"
update = "!f() { set -e; git checkout $1; git rebase master; git push -f origin $1; git checkout -; }; f"
> git outdated
- some-pr-branch-not-up-to-date-with-master
> git update some-old-branch
(check out branch)
(rebase master)
(force push branch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment