title: git: Switch branch and ignore any changes without committing
body: <p>I was working on a git branch and was ready to commit my changes, so I made a commit with a useful commit message. I then absentmindedly made minor changes to the code that are not worth keeping. I now want to change branches, but git gives me,</p>
  
  <blockquote>
    <p>error: You have local changes to "X"; cannot switch branches.</p>
  </blockquote>
  
  <p>Can I change branches without committing? If so, how can I set this up? If not, how do I get out of this problem? I want to ignore the minor changes without committing and just change branches.</p>