Henry
Henry

Reputation: 259

Why is my VS Code's git indicator showing "(Rebasing)" next to the branch name?

I'm having an issue with my vscode for git config. I believe git pull is set to perform merges by default. A couple weeks ago, I ran git config pull.rebase true, and since then, I keep seeing "(Rebasing)" next to my branch name. Like below:

screenshot of "(Rebasing)" indicator

I tried to revert it to default git config with git config pull.rebase false, but it's not working at all.

Why is this happening (is something wrong?), and how can I get it back to normal?

Upvotes: 2

Views: 4356

Answers (2)

starball
starball

Reputation: 51362

It sounds like you started a rebase and didn't finish. If you're in the middle of a rebase and want to abort it, use git rebase --abort. Otherwise, you should be able to see files that still need conflicts resolved in the Source Control view with a "UU" indicator next to them. Then you can find them, fix them, and run git rebase --continue. But see also How do you finish resolving merge conflicts for a rebasing pull in VS Code? (the commit button may switch to do rebase --continue automatically).

Upvotes: 7

amphetamachine
amphetamachine

Reputation: 30621

To prevent pull from attempting to auto-merge, run the following command to update your global git config:

git config --global pull.ff only

This may result in a failed pull especially on a shared branch, but it's easy enough to do a rebase at that point or a pull -r.

I would also turn off the auto-rebase feature:

git config --global pull.rebase false

Both these things will cause git to act more predictably when there's divergent branch history.

Upvotes: -1

Related Questions