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

  ultimately I lose a bunch of work.
Take a copy of the entire repository before attempting anything potentially destructive.


This is completely unnecessary. Everything git does, git can undo as long as your working tree is clean when you start the rebase. git reflog and git reset are your friends, if you want to "get back to where I was before I started this awful merge".


Or just write down the latest commit (or use git reflog to find it post facto) and if you mess up, do "git reset --hard <commit>" to get back to it.




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

Search: