Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move The Latest Commit To A New Branch #3

Closed
cletusw opened this issue Feb 9, 2016 · 1 comment
Closed

Move The Latest Commit To A New Branch #3

cletusw opened this issue Feb 9, 2016 · 1 comment

Comments

@cletusw
Copy link

cletusw commented Feb 9, 2016

For Move The Latest Commit To A New Branch, you can do it even more simply:

git branch my-new-branch
git reset --hard HEAD~

because git branch, unlike git checkout -b, doesn't actually take you to the newly created branch.

@jbranchaud
Copy link
Owner

@cletusw nice catch, I'm gonna start using that approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants