How do I undo parts of my unstaged changes in git but keep the rest as unstaged? The way I figured out is:
git commit --interactive
# Choose the parts I want to delete
# Commit the changes
git stash
git rebase -i master # (I am an ancestor of master)
# Delete the line of the most recent commit
git stash apply
This works, but it would be nice if there were something like git commit --interactive only for reverting changes. Any better methods?