Get latest on another branch without switching to be able to merge that branch into current

Answered

Hi, 

I have the workflow where we work on a "feature" branch that is branched from a "sprint" branch. Is there a way to get latest on that "sprint" branch and 'Merge Into Current'.

 

Currently, I have to leave the "feature" branch, and go into the "sprint" branch, then pull, then switch to "feature" branch again, and then right click on the "sprint" branch and click "Merge Into Current". 

 

I do this often enough that it has prompted me if there's a simpler way to ensure my "feature" branch is working with the latest of the "sprint" branch that I'll be creating a PR into. 

 

Any thoughts or advice on how to make this happen natively with Rider?

0
4 comments

Instead of switching to sprint - pulling from origin/sprint - switching back to feature you can merge origin/sprint directly.

Make sure to fetch before doing this, or use VCS - Git - Pull instead of Merge into current form Branches popup

0

Is there any way to keep this as a 2-step procedure? I'd like to be able to fetch the 'other' branch periodically and then merge at a time of my choosing, rather than necessarily try the pull command. Smart Merge does not work when I do Pull, only if I Merge directly. So I am currently fetching the other branch outside of Rider so that I can use Smart Merge in the IDE - not ideal.

Also, is there any prospect of the Pull Changes dialog being improved? I typically want to pull `origin/develop` into my current feature branch, but origin contains many other branches that other people work on - meaning that I have to scroll down for several pages until I find it - and then scroll a bit further to convince myself that there are no other branches inadvertently selected in that long list of checkboxes!

 

0

> So I am currently fetching the other branch outside 

If you are just fetching - then there is no need to do this outside - use VCS - Git - Fetch.

Fetch does not update your local branches and working copy though.

> meaning that I have to scroll down for several pages until I find it

Merge dialog, like a lot of other lists in the IDE, supports speedsearch just start typing when the focus is in the branches list.

0

> If you are just fetching - then there is no need to do this outside - use VCS - Git - Fetch

Not sure what exact command line that sends, but it didn't seem to work when I tried it earlier. I did the fetch and then merged develop into my branch, and it said it was already up to date. I switched to Sourcetree, forcibly fetched develop, came back to Rider, merged develop again, and this time it had all the new changes I expected.

> Merge dialog, like a lot of other lists in the IDE, supports speedsearch just start typing when the focus is in the branches list.

Good to know. That doesn't help with the problem of not being able to see at a glance which other branches might be selected, however.

0

Please sign in to leave a comment.