can you try :

git checkout master
git pull upstream master
git checkout realtime
git rebase master

and if it's a mess

git rebase --abort