title: git-stash vs. git-branch
body: <p>In a <a href="https://stackoverflow.com/questions/21848/switch-branch-names-in-git">previous Git question</a>, Daniel Benamy was talking about a workflow in Git:</p>
  
  <blockquote>
    <p>I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started my crap work.</p>
  </blockquote>
  
  <p>He wanted to restore his working state to a previous point in time without losing his current changes. All of the answers revolved around, in various ways, something like</p>
  
  <pre><code>git branch -m master crap_work
  git branch -m previous_master master
  </code></pre>
  
  <p>How does this compare to <code>git stash</code>? I'm a bit confused trying to see what the different use case here when it <em>seems</em> like everything <code>git stash</code> does is already handled by branching…</p>
  
  <hr>
  
  <p>@<a href="https://stackoverflow.com/questions/39651/git-stash-vs-git-branch#39862">Jordi Bunster</a>: Thanks, that clears things up. I guess I'd kind of consider "stashing" to be like a lightweight, nameless, branch. So anything stash can do, branch can as well but with more words. Nice!</p>