Re:Ask HN: Is it me or Git rebase is kind of hard to underst...
by seba_dos1 on Friday December 16, 2022 @10:11AM
(#34015378)
Just checkout (not cherry pick) the last commit from your reflog and point your branch to it and you'll be back exactly where you started. "git rebase --abort" simply did a checkout and pointed your branch to a place from before you started rebasing (that you apparently forgot about), you haven't lost anything.
I was working on my branch as usual. Today I checked git status and found out that I'm in the process of rebase. I was afraid a little, and decided to abort it.
I lost my changes.
When to git reflog, saw tons of commits, tried to cherry pick the one that has my changes.
Now, I have my branch with my changes. But. If I pull from origin, I lost them. If I push force the branch, I'll erase other devs changes.
It's so confusing =(