Reputation: 24480
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.
Upvotes: 1
Views: 531
Reputation: 526753
You could always just reset back to the state you were at before the rebase and then do a pull instead - use git reflog
to figure out the hash that you used to be at before the rebase, and then use git 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 --force
flag.
You may want to make a backup of your .git
folder first, just in case.
Upvotes: 3