you should use
git rebase --interactive <sha1>
where <sha1>
should not be the sha of the first commit you want to rewrite, but the sha of the commit just before.
if your story looks like this:
pick 43576ef last commit ... pick 5116d42 first commit to rewrite pick cb85072 last good commit
then you can specify various ways to indicate the commit you want to reinstall:
git rebase -i cb85072 git rebase -i 5116d42^
Where
^
means commit immediately before.-i
for short --interactive
source share