I’m doing a git rebase from a branch, where I picked up 3 changes but rebased like 10, I really wish I had used git pull. I guess I am s[till learning git. The changes were published…
I’d rather have done a git pull, so only the 3 checkins are added to the upper branch rather than rebaseing the dozen or so commits in the upper branch.
Is there a way to clean this up? Or just move on. Github won’t let me back out the commit, probably for good reason.
You could always just reset back to the state you were at before the rebase and then do a pull instead – use
git reflogto figure out the hash that you used to be at before the rebase, and then usegit reset --hard <sha>to reset your branch to that SHA. Then do the git pull normally. Once you’re to the state you’d prefer to be at, you can push back to github using the--forceflag.You may want to make a backup of your
.gitfolder first, just in case.