title: git: get working directory staged and non staged back after committing to new branch
body: <p>While on a <code>branch b1</code> with staged and unstaged files, I created a new branch (<code>backup-changes</code>) and <strong>committed</strong> those.</p>
  <pre><code>// Create the backup branch from the branch you are on
  $ git checkout -b backup-changes
  
  // make sure it is created and you are on the backup branch
  $ git branch -a
  
  // check status and add and commit to the backup branch just created 
  $ git status
  $ git add .
  $ git commit
  
  // do a dry run to see things what are things going to be
  $ git push -u origin backup-changes --dry-run
  
  // push to remote
  $ git push -u origin backup-changes
  </code></pre>
  <p>I did not want to stash it since I wanted a backup on a remote server.</p>
  <p>Now, I switch back to the <code>branch b1</code>, and want to get back all the staged and unstaged files as they were before I switched to &quot;<code>backup-changes</code>&quot; and committed? Is that possible?</p>