Skip to content

Rebase current branch onto another branch#108913

Merged
joaomoreno merged 4 commits intomicrosoft:masterfrom
tomerstav:rebase-onto-selected
Oct 23, 2020
Merged

Rebase current branch onto another branch#108913
joaomoreno merged 4 commits intomicrosoft:masterfrom
tomerstav:rebase-onto-selected

Conversation

@tomerstav
Copy link
Contributor

Added a new command 'Rebase Branch Onto...' in the git command options that lets you select a branch to rebase your current branch onto. Behind the scenes git checkouts the selected branch and runs git rebase [previous branch].

Screen Shot 2020-10-18 at 9 18 24 PM

This PR fixes #108725

@joaomoreno joaomoreno added the git GIT issues label Oct 19, 2020
@joaomoreno joaomoreno added this to the October 2020 milestone Oct 19, 2020
Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this looks polished, it's doing the wrong thing. It checks out the target branch and rebases that to the current branch. It should instead just do git rebase TARGET_BRANCH.

@tomerstav
Copy link
Contributor Author

@joaomoreno Looks good now? Any other changes you would like?

Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we probably should remove all onto references from the command names, etc, so not to confuse users who know what --onto does.

Also, when providing a choice picker to the user, we should automatically highlight the branch's upstream, if defined.

@joaomoreno
Copy link
Member

Thanks!

@joaomoreno joaomoreno merged commit 42e920a into microsoft:master Oct 23, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

git GIT issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git "rebase onto selected" support

2 participants