I should've done
git checkout -b "test"
git rebase master
I am a little confused as to the structure of the your repository before and after the creation of the "test" branch. I am assuming that "branch1" is branching off of master, and now "test" is sitting on top of "branch1" like this:
master branch1 test, HEAD - - * - - * - - * - - * - - * a b c d e
If this is the case then you can run
git rebase --onto master branch1 test and that will change your repository to:
master branch1 - - * - - * - - * a\ b c \ test - - - - - - - * - - * d' e'
If that is not the original situation, then I am confused.