November 18th, 2024

Git tooling updates in Visual Studio 17.12

Jessie Houghton
Program Manager

We are thrilled to announce the latest updates to Git tooling in Visual Studio, designed to enhance your development experience and streamline your workflow. These new features are in direct response to user feedback, ensuring that you have the tools you need to be more productive and efficient. For the full list, check out the release notes.

Pull request drafts and templates

You can now create pull request drafts and start your descriptions with GitHub templates in Visual Studio. These were the two top requests for the create a pull request experience.

Draft PRs

Use the drop-down menu on the Create button to Create as Draft.

Create as Draft preview menu

PR Templates

Your default PR template will be used when creating a new PR for both GitHub and Azure DevOps. Learn more about how to add a PR template to your repository in the GitHub documentation and Azure DevOps documentation.

Create internal GitHub repos

Visual Studio now supports internal repos for your GitHub organizations. We also included guidance for each type of repository to give you more clarity on the visibility of the new project depending on which account you’re using.

Create a new git repo menu

Copy Git link

Whenever you share a few lines of code with a colleague, it can often be useful for them to get extra context from your repository. However, if they’re working on something else it can take too long and disrupt their work to checkout your branch.

Now, you can highlight the code you want to share in your editor, open the context menu with a right click, and under the Git submenu get a shareable link to your code in GitHub or Azure DevOps. This makes it simple and easy to collaborate, and it smooths the flow between the IDE and your remote repos on the web.

Git menu option showcasing copy GitHub permalink

You can also get shareable links directly from commit history. This allows for code not currently checked out or code that exists in previous iterations to be referenced just as effortlessly.

Showing git history and grabbing permalink

Customize AI Git commit message

Now you can add additional instructions to the prompt for generating your Git commit message with GitHub Copilot. This allows you to customize the commit message to better fit your workflow and team’s standards. You can specify the number of lines to generate, the length of the lines, and even provide a sample commit style. Edit the message in the Tools > Options > Copilot > Source Control > Commit message additional instructions: prompt field.

showing prompt field for git commit messages

Git multi-repo support

You can now create pull requests and link work items in multi-repo scenarios. For both GitHub and Azure DevOps, we support your integrations when you use the repository picker to focus on a particular repository in your multi-repo scenarios.

showcasing the filter repo option with 4 repos

Keep sharing your feedback!

We are continuously striving to improve and adapt to your needs, and your feedback is invaluable in this process. Thank you for your continued feedback and support. Your insights help us shape the tools and features that make your development experience more efficient and enjoyable.

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.