Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Will this preserve the original B? Is it easy to throw away B' and go back to B? (honest question, I know hg only superficially)

The two hg commands you mentioned are summed up as one with git: git reset --soft HEAD^. Then if you commit B' but ever want to go back to B, you could do git reset --hard HEAD@{2}



Absolutely, it would preserve the original B.

You can easily switch your working directory to one of them: hg update B or B'

You can easily throw away the one you don't want to keep: hg strip B or B'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: