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


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.