I frequently get into a messy rebase then I hit the zipline eject button:
eject=!git reset --hard && git checkout master && git rebase --abort
Although I prefer multiple commands to be a bash or as below a fish alias:
function giteject
git reset --hard
and git checkout master
and git rebase --abort
end