title: how to commit changes in detached HEAD to a new branch in git
body: <p>I had a tag, at a very old revision of a repository.
  I have checked it out </p>
  
  <pre><code>   git checkout mytag
  </code></pre>
  
  <p>Now I am in detached HEAD state.</p>
  
  <p>I have made some meaningful modifications. I would like to create a new branch <code>mybranch_deviated</code> locally and remotely, and commit all the meaningful changes to it. How to do that?</p>