by greghinch · 13y ago · 0 comments
$ git stash $ git fetch $ git merge origin/$current-branch $ git push origin $current-branch $ git unstash
It's actually slightly fancier than that, the push actually reduces merge commits but doesn't rewrite your merges. Same as GitHub for Mac.
If you do have local changes, then you would need to git stash/stash --pop before/after that command. I use rebase to keep down on unneeded merges for the common case of having exactly one upstream and not merging several branches together.
I'm looking at you, jQuery.