June 19th, 2023

Announcing Create a Pull Request in Visual Studio

Jessie Houghton
Program Manager

 

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 Request

The basic flow follows these steps:

  1. 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.
  2. Commit and Push Your Changes. Then, you can commit and push your changes as you normally would in the Git Changes window.
  3. 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.
    • Create a Pull Request from the notification banner Create a Pull Request from the top level menu
    • 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.
    • Create a Pull Request screen
    • 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.
    • Create a Pull Request issue search
  4. 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.

Author

Jessie Houghton
Program Manager

Jessie is a Program Manager on the Visual Studio version control team, focusing on Git tooling and GitHub integration in the IDE.

31 comments

Discussion is closed. Login to edit/delete existing comments.

  • Sören Kuklau

    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...

    Read more
    • Jessie HoughtonMicrosoft employee Author

      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.

  • Ikenna Aniobodo · Edited

    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?

    • Sören Kuklau

      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...

      Read more
  • Tsahi

    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?

    • Peter, Michael (ext)

      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.

  • Jo Cogger

    Spelling correction suggestion: “your typing” -> “you’re typing”

  • Jordi Ponsoda Hernández

    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.

  • oronf

    Does this work with Azure DevOps Server (on-prem)?

      • Tobias Sachs

        Does this feature require a specific version of Azure DevOps Server on-prem?

      • Noman SEBT-X · Edited

        I’ve tried it but am unable to run it on Azure DevOps Server. Could you suggest any soltuion?

      • Seyyed Soroosh Hosseinalipour

        Azure DevOps Server (on-prem) is very essential product for many dev company, so thank you for supporting on-perm eco-system.

      • C. Ian McVicker

        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.

  • Seyyed Soroosh Hosseinalipour · Edited

    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

    • Michael Taylor

      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.

  • Eugene Kyba

    Will it work with BitBucket?

    • Jessie HoughtonMicrosoft employee Author

      This feature only works with GitHub and Azure DevOps.

      • Naga Ravi Shankar D

        Is there any chance to enable this feature for BitBucket?

  • Justin Smith

    You should mention that this requires enabling “Git Pull Request” in the Preview Features options.

    • Jessie HoughtonMicrosoft employee Author

      Thanks for your comment! The post has been updated.

  • Tsahi

    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...

    Read more
    • David

      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.

    • Michael Taylor

      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.

    • Alfred White

      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