title: How to find the git branch I was accidentally committing to after switching back to master
body: <p>I was working on a git branch other than master. I don't remember its name. When I was done with it, I did </p>
  
  <pre><code>git add .
  git commit -am "foo"
  </code></pre>
  
  <p>I didn't push the commits.</p>
  
  <p>I switched to master <code>git co master</code>. I don't know how to get back to my branch and commit the changes...</p>