December 10th, 2025
0 reactions

Streamlining your Git workflow with Visual Studio 2026

Mads Kristensen
Principal Product Manager

You’re a .NET developer with a busy morning, and an Azure DevOps ticket drops: “Login endpoint 500s under load.” You’ve got to fix it, review a teammate’s feature branch, and keep your repo clean – all before lunch. Visual Studio’s Git tools turn this everyday Git workflow of creating topic branches, stashing changes, committing, and handling PRs into a smooth, fast process.

Let’s walk through your morning, showing how Visual Studio keeps Git friction out of your way.

9:00 AM: Spin up a topic branch for your bug fix

Your repo’s open in VS (View → Git Repository), and you’re on main, fresh from last night’s CI run. To keep your bug-fix isolated, you right-click main in the Git Repository Window, select New Local Branch From, and name it fix/auth-race-1, linking it to your DevOps ticket. You’re switched to the new branch instantly, and the 2026 Git status bar shows your branch and sync status, so you’re never lost.

New Local Branch From

You update AuthService.cs with an async lock to fix the race condition.

A Slack ping from the PM interrupts: they need you to review a feature branch for a demo. Time to pause your work without losing it.

9:30 AM: Stash changes to juggle tasks

You’re mid-fix with unsaved changes, not ready to commit. In the Git Changes Window (View → Git Changes), you select your modified files, click Stash All, and add a note: “WIP: Auth fix before demo.” Visual Studio shelves everything, leaving your directory clean.

Picture2 image

Branch switching in Visual Studio is a lot faster now thanks to optimized solution load and indexing. You polish the feature and push it to remote, all while your bug fix stays safely stashed.

With the feature review done, you’re ready to return to your bug fix and polish it before committing.

10:15 AM: Pop stash and review code

You switch back to fix/auth-race-1, and Visual Studio’s fast branch switching keeps you moving. To restore your work, go to Git Changes Window, hit the Stash tab, right-click, and select Pop Stash. Your changes come back seamlessly.

Before committing, you want to catch any slip-ups. In Git Changes Window, click the Copilot Code Review button. Copilot scans your diff and leaves a few comments in the editor. You apply the suggestions with one click.

Picture3 image

For extra confidence, open Copilot Chat (View → Copilot Chat), type “#changes Check security,” and get: “Add rate limiting for brute-force protection.” You tweak the code, catching more issues early, which makes your eventual PR cleaner.

With your code polished, you’re ready to commit your changes.

10:45 AM: Time to commit

Your code’s solid, so it’s time to commit. In the Git Changes Window, click the Generate Commit Message button. It’s formatted to your team’s standard (learn how to set that up in an earlier blog post), tied to DevOps, and saves you a minute. Push your changes with a click, keeping your history clean and team friendly.

Picture4 image

Now it’s time to share this with your team.

11:15 AM: Create PR and review inline

Your work is now ready for a review! Upon pushing, you get a banner in the Git Changes window and click the link to create a pull request. (Alternatively, you can also go to Git Repository Window and right-click fix/auth-race-1 → Create Pull Request.) In the PR creation UI, select your lead, Sarah, and another teammate, Mike, as reviewers by clicking the Add Reviewers field and choosing their names from the dropdown. Since there’s just one commit, VS automatically pulls Copilot’s commit message into the Azure DevOps PR description. You could also generate a PR description to ensure it matches your team’s standards. Click Create, and it’s up for review.

Picture5 image

Sarah can easily review the PR right in Visual Studio, finding it assigned to her in the Git Repository Window.

Picture6 image

She opens the PR and adds comments directly inside Visual Studio. The Markdown renders right in the diff, threaded and clear. No browser tabs needed!

Picture7 image

You reply inline, make updates, and push your new changes. Visual Studio syncs the diff instantly. Reviews feel less cluttered, and Sarah and Mike approve. You merge to main and delete the branch to keep the repo clean.

Wrap-up: Git that flows

Visual Studio’s Git tools – fast branch switches, visual diffs, Copilot commits, AI reviews, inline comments – save you time in your daily grind. Branching, stashing, and PRs are smoother than ever before, letting you focus on code. The AI review before committing catches mistakes early, setting your PRs up for success.

Try it out and let us know what other Git topics you want to know more about in the comments below.

Happy coding!

 

 

 

 

Author

Mads Kristensen
Principal Product Manager

Mads Kristensen is a Principal Product Manager at Microsoft, working to enhance productivity and usability in Visual Studio. He’s behind popular extensions like Web Essentials and File Nesting and is active in the open-source community. A frequent speaker, Mads is dedicated to making Visual Studio the most enjoyable IDE for developers.

4 comments

Sort by :
  • Andreas Saurwein 10 minutes ago

    Now if only diffs would start to understand context so that we don’t need conflict resolution anymore. The standard git diff is sooooo outdated, don’t tell me that we can’t do better.
    A simple method insert that starts with the same xml doc comment throws the diff totally off and makes it hard to read the diff.

  • Vaclav Elias 3 hours ago · Edited

    Copilot Code Review isn’t working for some of us (it’s never worked for multiple repositories in VS, even though my changes are mostly in one repository). Could this please be fixed? https://developercommunity.visualstudio.com/t/The-Review-changes-with-Copilot-is-not/10936746?q=copilot+review

    If it can’t be fixed, could the reviews at least be logged in GitHub Copilot Output so we can read them there?

    Thank you.

  • Gabriele Andreoni 19 hours ago

    Great post!
    I think the only missing feature in git repository on visual studio is to manage the interactive rebase of multiple commits (reorder, renaming). It would be great feature aiming to drop definitely the command line or external tools.