December 10th, 2025
heartintriguinglike4 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.

To see these features in action, watch this Visual Studio Toolbox episode with Leslie Richardson and Leah Tran.

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.

35 comments

Sort by :
  • Shawn Cicoria

    Be amazing if it could use a “git worktree” — and any .env files, settings, etc. that aren’t “git tracked” are populated over in that worktree location. Far more “isolated” and less prone to pollution if there is well known to the Developer what is being brought over for configuration vs. what is secretly behind the scends and often hidden by the IDE.

  • Andrea Romano

    After I have reviewed a PR, how can I approved it or reject it or wait for author? And also, how can I add a required reviewer?

    As I have replied below this, we use VS 2026 Enterprise 18.1.1 but in Git Repository view there isn’t the Pull Requests list, even if in devops browser I can see the PR assigned to me.

    There is some specific permission or configuration to view PR list or something else?

  • Andreas Unverdorben

    Too bad creating PRs in Visual Studio is not available for Git repos from Azure DevOps Server (on-prem).

      • Andreas Unverdorben

        When working with a git repo cloned from our on-prem Azure DevOps Server, then it’s not available. At least to me and Copilot and ChatGPT both say it’s not available for Azure DevOps Server.

  • zwhitesel

    VS doesn’t recognize that the solution is in a repo when working in a worktree. The git ui in side panel becomes completely useless.
    I use the “bare” flag for initial checkout.

  • Jeremy Powell

    I would love it if Microsoft/Visual Studio showed some love to other workflows. Personally, I find Gerrit-style patchsets to be far preferable to pull requests. Unless I’ve missed something, VS Pro is basically useless at interactive rebases and the like.

      • Jeremy Powell

        Thanks! I upvoted that one years ago, but it's good to have the link here for others!

        FWIW, it's not a force push with Gerrit - they're individual commits with refs for a particular branch, and the revisions of a patch are linked by their ChangeId in the commit message. The commits don't appear on a remote branch until they're reviewed and accepted/submitted. AFAIK, VS 2026 doesn't support pushing changes to Gerrit/Critique.

        Considering the workflow of implementing a feature as a Gerrit user, I often notice that there might be some bugs/tech debt that affect completion of the task. So, I...

        Read more
  • zwhitesel

    When do we get git worktree support? It’s so much nicer than using git stash when working with large projects.

    • Alexandre Grigoriev

      Umm... VS has been supporting worktrees for very long time.

      There's no GUI support for creating a worktree, but a CLI command is simple enough to not bother with that.

      I suggest to configure "Git Bash" as one of tools in External Tools as: Command: C:\Program Files\Git\git-bash.exe, Initial directory: $(SolutionDir)

      BEWARE that if you click the command too early while VS is opening a directory, the initial directory will be set to C:\Windows\System32.

      What's much needed is automatic opening of submodules as a multi-repo. Then you would not need to open multiple VS and multiple Bash windows for submodules.

      Read more
      • Alexandre Grigoriev

        Also, to keep a separate Bash command history per repository, put the following in ~/.profile:

        if test -d .vs
        then
                export HISTFILE=$(pwd)/.vs/.bash_history
        fi
        
        
  • Dan Siders

    What is needed to get the Pull Requests section to appear in the Git Repository Window? I only see Branches / Tags in my VS 2026. Is it not supported in Azure DevOps repos?

      • Andrea Romano

        the same here. VS 2026 Enteprise Version: 18.1.1

        I can see only Branches / Tags

      • Dan Siders

        I see no such setting. Only “Pull Request Comments”. I’m running VS 2026 18.1.0. Is it on an Insider build?

  • Eric Williams

    Life is so much easier when you spell git stash as git worktree

  • Davide Bellone

    This works well except when you have merge conflicts. Right now, it’s not possible to resolve merge conflicts directly in Visual Studio; you have to use the (incredibly terrible) UI in Azure DevOps (or GitHub).

    • Alexandre Grigoriev

      I’m resolving merge conflicts in VS all day long. What are you talking about?

      • Davide Bellone

        As Andreas pointed out, yes, it is possible, but it's very difficult to use.

        Also, there's another pain point, in our case, with automatic PRs.

        As an example: I have a branch release/2024 and a branch release/2025. Some automatic tool creates a PR on Azure DevOps from release/2024 to release/2025.

        If there are merge conflicts, they are usually resolved directly via the browser. However, it's not possible to be sure of the final result of the merge, until we run the CI pipeline.

        So, in the case of complex merges, we have to rely on a third branch, with a flow like this:
        1....

        Read more
      • Andreas Saurwein

        Yes you can, but seriously, it’s a terrible experience. Most of merge conflicts could be solved automatically with a little bit of better contextual understanding and AI.

  • Andreas Saurwein

    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.

    • Mads KristensenMicrosoft employee Author

      We’re looking into it. We actually built prototypes in the past using our machine learning models (IntelliCode), but we couldn’t get the success rate high enough to add value consistently. Now with AI it is something we are revisiting. It would be so helpful if we didn’t have to manually deal with merge conflicts anymore.

      • Alexandre Grigoriev

        Often, merge conflicts are a result of word-diff on an affected line, or adjacent line. In these cases, VS could suggest the merge result by doing word-diff merge rather than usual line-diff merge.

        Oh, and I would appreciate very much if: 1) F9 (next conflict) would not also set a breakpoint in the merge window, and 2) .editorconfig properly worked for the merge result.

'; block.insertAdjacentElement('beforebegin', codeheader); let button = codeheader.querySelector('.copy-button'); button.addEventListener("click", async () => { let blockToCopy = block; await copyCode(blockToCopy, button); }); } }); async function copyCode(blockToCopy, button) { let code = blockToCopy.querySelector("code"); let text = ''; if (code) { text = code.innerText; } else { text = blockToCopy.innerText; } try { await navigator.clipboard.writeText(text); } catch (err) { console.error('Failed to copy:', err); } button.innerText = "Copied"; setTimeout(() => { button.innerHTML = '' + svgCodeIcon + ' Copy'; }, 1400); }