Second revision:
git reset
git stash (to stash away your changes)
git reset
git stash (stash away X)
git stash apply stash@{1} (apply your changes)
git add . (add and commit and push ..)
git commit -m "some changes"
git push
git stash apply stash@{0}
Revised answer:
So, you need to reset take another step back in history:
git reset
git stash (to stash away your changes)
git reset
git stash apply (apply your changes)
git add . (add and commit and push ..)
git commit -m "some changes"
git push
git merge featureX (re merge the changes from X)
Original answer:
You can reset your head so that your commit is moved to the index:
git reset
git , . :
git stash save "stashing commit for changes from X"
X , :
git push
git stash apply
git add .
git commit -m "some stuff"