title: Undo part of unstaged changes in git
body: <p>How do I undo parts of my unstaged changes in git but keep the rest as unstaged?  The way I figured out is:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>This works, but it would be nice if there were something like <code>git commit --interactive</code> only for reverting changes.  Any better methods?</p>