'Git rebase in Visual Studio

I suppose I'm getting confused about the wording within the Visual Studio 2019 Git Rebase UI. Silly question.

Scenario: I'm working in a branch called COREv2.0 . Bug fixes and other such things have been committed to master. COREv2.0 is still a work in progress, but I want to pull in those changes from master so I have those fixes that master has.

Thus, in my own words, I believe I want to rebase the COREv2.0 branch on the current master.

In Visual Studio, do I need to rebase FROM the current branch (COREv2.0) ONTO master? Or do I have that reversed? Does this screenshot represent what I'm wanting to do here?

enter image description here



Solution 1:[1]

Does this screenshot represent what I'm wanting to do here?

It's a little different in Visual Studio 2019. Here you can rebase branches in "Branches" pane of "Git Repository" tab, which is accessible from both View>Git Repository or Git>Manage Branches menus.

To rebase your feature branch onto master:

  1. checkout feature branch
  2. in the list of branches in "Branches" pane, right-click on master
  3. find and click the Rebase '<feature-branch>' onto 'master' item in popup

This is equivalent to:

git rebase master <feature-branch>

or

git rebase master

, when the feature branch is checked out.

Solution 2:[2]

I think you are looking for this command: git merge master. It will merge master branch into your checked-out branch ('COREv2.0').

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 saastn
Solution 2 Dharman