I'm kind of a git beginner and I was attempting to roll back to a previous commit. But I accidentally just rolled back the commit (I was using the Windows GUI). Anyway, after some weird pushing, merging, and other confusing stuff I didn't quite understand, I finally got my files the way I wanted them. The only weird thing is in the shell now it says:
(master|REBASE 1/1)
It used to just say master
, so what happened? What does this mean? And how do I get it back to how it was?
You can run git rebase --abort to completely undo the rebase. Git will return you to your branch's state as it was before git rebase was called. You can run git rebase --skip to completely skip the commit.
git rebase master aq onto the branch which will keep the commit names, but DO NOT REBASE if this is a remote branch. You can git merge master aq if you don't care about keeping the commit names. If you want to keep the commit names and it is a remote branch git cherry-pick <commit hash> the commits onto your branch.
Simply clearing the contents and saving the rebase that opens up in VS Code during the interactive rebase will abort the rebase as noted in its comments: # However, if you remove everything, the rebase will be aborted.
After issuing git rebase --continue , a commit is made, you will have to inspect that commit. Or, you can issue git status before issuing git rebase --continue to see all those files. But after you've rebased, they're now part of the repository history.
You are stuck in the middle of a rebase.
If you have merged/solved conflicts for all the paths:
use git add .
to commit resolved items.
use git rebase --continue
to complete the process.
Or use git rebase --abort
to exit the rebase process without any risk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With