We heard from you that you can do 90% of your development workflow in Visual Studio, but then need to rely on the web to create your pull requests. We’re continually bringing productivity enhancements to Visual Studio and are excited to announce that as of 17.7 preview 2 release. You can now create a pull request without leaving the development environment.
Creating a Pull Request
We’ve been working on integrating more GitHub and Azure DevOps features into the git tooling to supercharge your productivity and collaboration. We know pull requests are highly utilized for code review in both open source and enterprise environments. We hope that wherever and however you work, this new feature will fit into your workflow and help you become more productive than ever.
Turn on the feature flag
To make sure you can try out the feature, ensure it’s enabled in Tools > Options > Preview Features > Git Pull RequestThe basic flow follows these steps:
- Create a New Branch. Before you can create a pull request, you’ll need to create a new branch for your changes. This keeps your modifications separate from the main branch until they’re ready to be merged.
- Commit and Push Your Changes. Then, you can commit and push your changes as you normally would in the Git Changes window.
- Create a Pull Request. Click the link in the notification banner to “Create a Pull Request.” Alternatively, you can create pull request from a remote branch by navigating to the New Pull Request window via the top-level menu Git > GitHub or Azure DevOps > New Pull Request. Or right click a branch in the Git Repository Window.
- Select the branch that you want to merge into the original repository and give your pull request a descriptive title and description. The diff view on the right allows you to see all your changes as you’re typing.
- You can link work items by referencing them with the issue search, by typing # in the description box or pressing the # button in the lower right corner. We’re currently working on adding support for reviewers. Once you’ve created your pull request, other developers can review your changes and provide feedback.
- Making Updates and Edits: One of our current limitations means you’ll need to use the web interface to make additional edits to the title, description, reviewers, and linked work items. Once you push new changes to your branch, they will automatically update the pull request in the web.
Looking Forward
As a highly requested integration, the process of developing the pull request experience is an ongoing collaborative effort between our development team and the Visual Studio community. We received a lot of feedback from users who were looking for a more streamlined way to create pull requests, and we performed a series of user studies and survey rounds to get at the primary pain points in this experience.
We’re not done with the pull request experience, and we need your feedback to help drive our development. Some of our next steps include:
- Allowing users to add reviewers and required reviewers
- Markdown support for the description box
- Viewing and tracking your pull requests inside Visual Studio
Please share your thoughts on the feature, and what you’re looking forward to the most in this survey.
Thanks for bringing back VS-integrated pull requests!
I had an existing repo for a project from Azure DevOps, and VS wouldn't show the Git --> Azure DevOps menu item. I pulled the same project again into a second repo, and in that one, VS _did_ show the items. So I'm guessing there's something in the metadata (in .gitattributes, .git/, .vs/?) that tells VS that this is a project that supports Azure DevOps pull requests, but I...
Please report an issue via the internal reporting system in the upper right corner of VS, so we can collect logs of the situation and understand it better.
Somebody asked me: What the heck is PULL REQUEST?
Is this nuisance ever going to stop in Developer Community? What happened to reasonable/meaningful plain Engish expression to define a concept or something?
I dunno. I've seen worse jargon.
A pull request is a process that combines
* a code review (someone else sees your changes, can comment on them, remark whether they fit policies, be on the lookout for potential bugs, etc.)
* merging your changes into the destination branch
I'd argue "merge request" (which it's sometimes called) is a bit more apt. But the metaphor is basically: _you_ request that _someone else_ pulls your code changes, and they'll only...
Once this goes live, will I be able to turn it off so that the current behavior (“Create a PR” takes you to the web UI with the right branches) is preserved?
Does this also integrate with the feature to create Branches across multiple repositories?
A lot of our workItems require to cretae branches and pull requests across mulitple repositories and it would be nice to create in one go mulitple branches and then for all these branches pull requests.
Thanks for sharing your suggestion and your scenario! Please leave a suggestion on Developer Community https://developercommunity.visualstudio.com/VisualStudio/suggest, so we can track your suggestion and others can vote on it!
Spelling correction suggestion: “your typing” -> “you’re typing”
Nice to see this feature again in VS. Back then when we used TFS we had full integration of the VCS in the VS IDE and then at some point we were forced to move into the web ui because the feature was completely removed. This was really annoying st the time.
Does this work with Azure DevOps Server (on-prem)?
Yes, if you encounter issues, please report them here – https://developercommunity.visualstudio.com/VisualStudio/report?
Does this feature require a specific version of Azure DevOps Server on-prem?
I’ve tried it but am unable to run it on Azure DevOps Server. Could you suggest any soltuion?
I’m sorry to hear you’re experience difficulties, please report the issue here https://developercommunity.visualstudio.com/VisualStudio/report, so we can more easily track your problem and follow up!
Azure DevOps Server (on-prem) is very essential product for many dev company, so thank you for supporting on-perm eco-system.
This is absolutely true. It seems like with so many new features are being pushed to cloud only which increases the gap between server and cloud versions. I appreciate that this is not the case as much with TFS/DevOps Server as it is with many other server suites like *cough* Exchange server. Big thanks to the Azure DevOps team for your continued dedication to on-prem products.
ITNOA
How to create PR for Microsoft Azure DevOps? your pictures only shows GitHub, but many developers use Azure DevOps, please add some pictures for Azure DevOps
Thanks
The UI doesn’t have any mention of GitHub/Azure DevOps as both are Git-based. The only difference is what service it is calling to get the data backing the UI. Where in the screenshots are you seeing any differences because you’re using DevOps? I’m using DevOps and my screen looks just like the images that were posted.
As you can see in https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2023/06/image002-268×300.png , in the Git menu, Only GitHub show on picture, and does not see Azure DevOps
If your active repository is hosted on Azure DevOps, you’ll see Azure DevOps in the menu instead of GitHub. Please report an issue if you encounter further problems – https://developercommunity.visualstudio.com/VisualStudio/report.
Will it work with BitBucket?
This feature only works with GitHub and Azure DevOps.
Is there any chance to enable this feature for BitBucket?
You should mention that this requires enabling “Git Pull Request” in the Preview Features options.
Thanks for your comment! The post has been updated.
I wish I had seen this feature request earlier, so I could vote against it. The Web UI works great, I don't know what people are complaining about. It's not like you're doing five PRs a day. I make a PR usually no more than twice a week, so going out of VS for that is not an issue. It's not like we're not spending half our time in Azure DevOps anyway, to manage work...
This is a nice new feature for people that want to work as much as possible in one environment. This doesn’t take away from what people are currently doing and are happy with.
I would disagree. I do 3-5 PRs a day several times a week. We do lots of little changes and push them so we have very fast iterations on the code. Just because it is in VS doesn’t mean you cannot use the web as well. I use both together to get my work done (+ CLI). Having more choices is generally a good idea.
Not every PR is a multi-day project. I can think of several times I pushed multiple PRs in a single day. It isn’t that uncommon