Change Pull Request Target Branch
It would be great to be able to change the target branch of a pull request. Sometimes a pull request is simply opened against the wrong branch. Other times, the comments and discussion resolve in wishing to integrate with a different branch prior to promoting to the original target.
I'm happy that this will be implemented. Will it also be possible to update/rebase PR on current target branch?
A workaround (ex PR on target branch "target-branch") would be to:
1. create a new branch identical to target branch "target-branch2"
2. Change Pull Request Target Branch to "target-branch2"
3. Change Pull Request Target Branch back to "target-branch"
But that would be tedious, so please consider this use case as well.. :)
Tom Parrish commented
Good stuff guys, thanks!
Maxwell Bloch commented
Benjamin Gare commented
This update is the best email I've received this week!
There was people cheering in the office when they got the notification about this having started / being scheduled for Q3. Thanks.
This is great!! Many instances we needed to change the target branch.
It would be nice to be able to view different repositories in a single view
Alejandro Barreto commented
Wooo! This is now in-work for 2018Q3 as per their Features Timeline:
"Git Pull Requests – Change target branch for an active pull request"
Max Huang-Hobbs commented
This would be helpful.
Greg L. Wright (3M) commented
+1 bump, for us this goes many ways, by mistake, but more typically, by having to put a private branch (review) onto a feature branch, or more.
MAYSAM GAMINI commented
Please Give high priority on this.
Albert Stimson commented
This is part of our basic workflow, not just needed when a dev makes a mistake. When a pull request misses a deadline for a code freeze, it generally needs to target a different branch. Redoing all of the documentation, comments, and attached work items after abandoning the pull request is not ideal.
Joydeep Tapadar commented
I am also facing the issue often. Please give priority on this task and give update
Benjamin Gare commented
Can we get a target date for this? I have to change the target branch OFTEN in my daily work since some Pull Requests have a longer review process.
James Chorlton commented
Any news on this Microsoft? Found my way here whilst googling how to do it in VSTS, not a great thing that the top google result tells you that you cant do it.
Lee Richardson commented
Wait, so if I have stacked PR's I have to delete and resubmit downstream PR's when an upstream one gets merged?! All the comments and dialog gets deleted?! I just moved from github and assumed this was a standard feature. And this has been a feature request for 2 years?! Poorly done VSTS.
Brian Kelley commented
This is an especially useful feature for stacked Pull Requests. PR 2 depends on PR 1. Both are created and PR 2 is targeted to PR 1's branch for diffing purposes. PR 1 is completed and merged to master, then PR 2 is updated to target to master and completed.
Bert Cotton commented
This is a feature that GitHub has that our developers often comment on VSTS not having.
Eric Ralhan commented
This is a basic feature in contemporary git source control tools. And as this was raised back in 2015, I don't think it's in backlogs items. This is why I prefer open source over MS.
Josh Brown commented
Chiming in to this thread to request this feature as well. We've run into this exact issue several times already. Would love to be able to change the target branch instead of abandoning the PR and losing the comment history in the process.