Posted By

Glycerine on 03/27/12


Tagged

reset move no git hard branch


Versions (?)

Git move commit to from 'no branch'


 / Published in: Python
 

URL: http://stackoverflow.com/questions/1628563/git-move-recent-commit-to-a-new-branch

Reset a branch. Notably used for moving a commit from one branch to another, or fix a commit on 'no branch'

  1. git branch newbranch
  2. git reset --hard 2d42c47...
  3. git checkout newbranch

Report this snippet  

You need to login to post a comment.