There are many ways to do this:

First, you'd like to create your new branch that only has this change in it:
```bash
$ git branch handle-docstring-none master   # Create a new branch 'handle-docstring-none' from your master
$ git checkout handle-docstring-none
$ git cherry-pick --no-commit 2ece1b74b7ca7023db8e7485e519665f740f7de5   # Add the patch we'd like to commit to index, but don't commit it
$ git reset -p   # Choose which hunks you would like to NOT commit in this branch
$ git diff --cached   # Look at the patch that is staged for commit to make sure it looks allright
$ git commit   # You know this ;-)
$ git checkout .   # remove all the other changes
$ git push origin handle-docstring-none
# Go to github to make the pull request
```

Now we would like to remove the patch from this the `error_codes` branch. Here's one way of doing it using an [interactive rebase](http://git-scm.com/book/en/Git-Tools-Rewriting-History):
```bash
$ git checkout error_codes
$ git rebase -i '2ece1b74b7ca7023db8e7485e519665f740f7de5^'
# put 'edit' in front of the commit you'd like to edit, 2ece1b74b7ca7023db8e7485e519665f740f7de5
$ git rebase 'HEAD^'   # reset the commit
$ git add -p   # choose everything you'd like to commit (minus the patch we have in the other branch)
$ git commit
$ git checkout   # Remove the patch you were not interested in
$ git rebase --continue   # apply the other patches
$ git push -f origin error_codes   # repush the new commits. You need --force it because you've changes the history.
```
...however, I'd probably do this (since it's more efficient):
```bash
$ git checkout error_codes
$ git rebase handle-docstring-none   # the patch in handle-docstring-none will be removed in the other commit, because it's already applied.
$ git rebase -i 'handle-docstring-none^'
# remove the line equivalent to the commit in handle-docstring-none, save and close.
$ git push -f origin origin error_codes   # repush the new commits. You need --force it because you've changes the history.
```

I hope this helps.