3 ms·
I'm the opposite and think rebasing is easier, but I am biased obviously since I have only used rebasing to solve merge conflicts. There are a couple ways of p
by savg 4y ago
I'm the opposite and think rebasing is easier, but I am biased obviously since I have only used rebasing to solve merge conflicts.
There are a couple ways of performing a git rebase, namely
* git rebase
* git rebase interactive (git rebase -i)
* git rebase --onto
I think following these videos may help and will explain it better than I can.
What is Git Rebase? [Intermediate Git Tutorial] - https://www.youtube.com/watch?v=_UZEXUrj-Ds https://www.youtube.com/watch?v=_UZEXUrj-Ds
Squashing Git commits with Interactive Rebase -https://www.youtube.com/watch?v=7IfkL8swmFw https://www.youtube.com/watch?v=7IfkL8swmFw
How to undo git rebase using git reflog. - https://www.youtube.com/watch?v=qP4i3S2hujc&t=203s https://www.youtube.com/watch?v=qP4i3S2hujc&t=203s
- Akcium 4y agoI know little about git rebase, but the situation that just happened is kind of weird. 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 =(
- seba_dos1 4y agoJust 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.