Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Git (master|REBASE 1/1) mean? How do I get rid of it?

Tags:

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?

like image 691
Captain Stack Avatar asked Aug 17 '13 19:08

Captain Stack


People also ask

How do I stop git rebase?

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.

How do you change from master to branch?

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.

How do I stop rebasing in VS Code?

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.

What happens after git rebase continue?

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.


1 Answers

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.

like image 158
dkrikun Avatar answered Sep 21 '22 12:09

dkrikun