title: git how to checkout to a commit make some changes and push it back to master
body: <p>So I have many commits in the master branch. I want to roll back to a commit and make some changes in one file. It's simply to do with <code>checkout</code> command.</p>
  
  <p>So what were my steps.
  1. I've checkout new branch from master <code>git checkout -b new_branch</code>
  2. Then in new_branch I made <code>git checkout f95ecfe</code> to roll back to a commit.</p>
  
  <p>Now it says: <code>HEAD detached at f95ecfe</code></p>
  
  <p>On this stage I want to add some changes and push this new branch to the bitbucket.</p>
  
  <p>Should I do some other actions or I can simple make <code>git push origin new_branch</code></p>
  
  <p>Also in the master after this commit f95ecfe I have many other commits, so my question also how can I correctly merge this new branch with detached head with a master. Will it just merge one my modified file or it will merge entire tree from new branch with have different state of all files with master tree?</p>