Maybe this already exists somewhere and I don't know about it ...
Anyway, when working on feature branches I wanted a quick way to switch to master, pull, switch back and finally rebase.
So I made a little script (https://gist.github.com/lelanthran/6c9bd1125f89e7621364878d1...) that pushes the current branch name onto a stack before switching to a new branch, and allows me to switch back to the topmost branch on the stack.
xgit master # Switch to master from current <really long branchname>
git pull
xgit pop # Switches back to <really long branchname>
git rebase master
I use this now very frequently; when I need to switch to branches I use `xgit <branch>`, because then I can switch back easily using `xgit pop`.