Git move commit to from 'no branch'


/ Published in: Python
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. git branch newbranch
  2. git reset --hard 2d42c47...
  3. git checkout newbranch

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.