Y
Hacker News
new
|
ask
|
show
|
jobs
by
Estragon
3729 days ago
ultimately I lose a bunch of work.
Take a copy of the entire repository before attempting anything potentially destructive.
2 comments
jeremyjh
3728 days ago
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".
link
tom9729
3729 days ago
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.
link