I would make this a comment but I don't have enough reputation yet. Can you clarify something - are commits 9 through 12 merge commits? If yes, why would you want to include merge commits in the linear history? Isn't the point of a linear history to omit merge commits?
Edit: Regardless, try this:
1) Figure out the commit hash of commit 1. Let's say it's 5678.
2) git checkout master. Then execute git rebase -i 5678. You'll get a prompt. Reorder the commits 1 through 12. Then save and exit the editor.
3) git checkout newbranch. Then execute git rebase master.
Rewriting history is always risky, so I'd make sure to have another branch pointing to master before I tried this (origin/master or some other local branch), and that way if things go awry, I can git reset --hard <pointer-to-previous-master>. Same goes for newbranch.
After you're done and everything looks good on master and newbranch, you can delete branches 1-3 using git branch -D.