Yeah it is a bit of a mess now. One problem is that you are working on your master branch which is not very good, because then you can't merge the upstream master any more. First "git branch" this stuff (an extra backup would be good too probably). Then `git reset b6e289d` (after doing a backup), if you did commits after b6e289d you may need to git cherry-pick those. *Then* you can use `git rebase -i 3005596`, etc. Since you generally don't want to work on the master branch, you may want to close this pull request, push the new branch and then create a new pull request based on that branch. I have to go, maybe this gives you enough ideas on how to fix things up though...