{"id":255159,"date":"2025-12-10T07:00:47","date_gmt":"2025-12-10T15:00:47","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=255159"},"modified":"2025-12-15T10:24:13","modified_gmt":"2025-12-15T18:24:13","slug":"streamlining-your-git-workflow-with-visual-studio-2026","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/streamlining-your-git-workflow-with-visual-studio-2026\/","title":{"rendered":"Streamlining your Git workflow with Visual Studio 2026"},"content":{"rendered":"<p>You\u2019re a .NET developer with a busy morning, and an Azure DevOps ticket drops: \u201cLogin endpoint 500s under load.\u201d You\u2019ve got to fix it, review a teammate\u2019s feature branch, and keep your repo clean &#8211; all before lunch. Visual Studio\u2019s Git tools turn this everyday Git workflow of creating topic branches, stashing changes, committing, and handling PRs into a smooth, fast process.<\/p>\n<p>Let\u2019s walk through your morning, showing how Visual Studio keeps Git friction out of your way.<\/p>\n<h2>9:00 AM: Spin up a topic branch for your bug fix<\/h2>\n<p>Your repo\u2019s open in VS (View \u2192 Git Repository), and you\u2019re on main, fresh from last night\u2019s CI run. To keep your bug-fix isolated, you right-click main in the <strong>Git Repository Window<\/strong>, select <strong>New Local Branch From<\/strong>, and name it <em>fix\/auth-race-1<\/em>, linking it to your DevOps ticket. You\u2019re switched to the new branch instantly, and the 2026 Git status bar shows your branch and sync status, so you\u2019re never lost.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture1.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255160\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture1.webp\" alt=\"New Local Branch From\" width=\"499\" height=\"375\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture1.webp 499w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture1-300x225.webp 300w\" sizes=\"(max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p>You update <em>AuthService.cs<\/em> with an async lock to fix the race condition.<\/p>\n<p>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.<\/p>\n<h2>9:30 AM: Stash changes to juggle tasks<\/h2>\n<p>You\u2019re mid-fix with unsaved changes, not ready to commit. In the <strong>Git Changes Window<\/strong> (View \u2192 Git Changes), you select your modified files, click <strong>Stash All<\/strong>, and add a note: \u201cWIP: Auth fix before demo.\u201d Visual Studio shelves everything, leaving your directory clean.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture2.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255161\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture2.webp\" alt=\"Picture2 image\" width=\"437\" height=\"457\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture2.webp 437w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture2-287x300.webp 287w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture2-24x24.webp 24w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p>With the feature review done, you\u2019re ready to return to your bug fix and polish it before committing.<\/p>\n<h2>10:15 AM: Pop stash and review code<\/h2>\n<p>You switch back to <em>fix\/auth-race-1<\/em>, and Visual Studio\u2019s fast branch switching keeps you moving. To restore your work, go to <strong>Git Changes Window<\/strong>, hit the <strong>Stash<\/strong> tab, right-click, and select <strong>Pop Stash<\/strong>. Your changes come back seamlessly.<\/p>\n<p>Before committing, you want to catch any slip-ups. In <strong>Git Changes Window<\/strong>, click the <strong>Copilot Code Review <\/strong>button. Copilot scans your diff and leaves a few comments in the editor. You apply the suggestions with one click.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture3.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255162\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture3.webp\" alt=\"Picture3 image\" width=\"1430\" height=\"479\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture3.webp 1430w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture3-300x100.webp 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture3-1024x343.webp 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture3-768x257.webp 768w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/a><\/p>\n<p>For extra confidence, open <strong>Copilot Chat<\/strong> (View \u2192 Copilot Chat), type \u201c#changes Check security,\u201d and get: \u201cAdd rate limiting for brute-force protection.\u201d You tweak the code, catching more issues early, which makes your eventual PR cleaner.<\/p>\n<p>With your code polished, you\u2019re ready to commit your changes.<\/p>\n<h2>10:45 AM: Time to commit<\/h2>\n<p>Your code\u2019s solid, so it\u2019s time to commit. In the <strong>Git Changes Window<\/strong>, click the <strong>Generate Commit Message<\/strong> button. It\u2019s formatted to your team\u2019s standard (learn how to set that up in <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/customize-your-ai-generated-git-commit-messages\/\">an earlier blog post<\/a>), tied to DevOps, and saves you a minute. Push your changes with a click, keeping your history clean and team friendly.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture4.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255163\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture4.webp\" alt=\"Picture4 image\" width=\"448\" height=\"624\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture4.webp 448w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture4-215x300.webp 215w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/a><\/p>\n<p>Now it\u2019s time to share this with your team.<\/p>\n<h2>11:15 AM: Create PR and review inline<\/h2>\n<p>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 <strong>Git Repository Window <\/strong>and right-click fix\/auth-race-1 \u2192 <strong>Create Pull Request<\/strong>.<strong>)<\/strong> In the PR creation UI, select your lead, Sarah, and another teammate, Mike, as reviewers by clicking the <strong>Add Reviewers<\/strong> field and choosing their names from the dropdown. Since there\u2019s just one commit, VS automatically pulls Copilot\u2019s commit message into the Azure DevOps PR description. You could also generate a PR description to ensure it matches your team\u2019s standards. Click Create, and it\u2019s up for review.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture5.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255164\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture5.webp\" alt=\"Picture5 image\" width=\"1430\" height=\"788\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture5.webp 1430w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture5-300x165.webp 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture5-1024x564.webp 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture5-768x423.webp 768w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/a><\/p>\n<p>Sarah can easily review the PR right in Visual Studio, finding it assigned to her in the <strong>Git Repository Window<\/strong>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture6.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255165\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture6.webp\" alt=\"Picture6 image\" width=\"498\" height=\"534\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture6.webp 498w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture6-280x300.webp 280w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/a><\/p>\n<p>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!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture7.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-255166\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture7.webp\" alt=\"Picture7 image\" width=\"1430\" height=\"816\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture7.webp 1430w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture7-300x171.webp 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture7-1024x584.webp 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/12\/Picture7-768x438.webp 768w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/a><\/p>\n<p>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.<\/p>\n<h2>Wrap-up: Git that flows<\/h2>\n<p>Visual Studio\u2019s Git tools &#8211; fast branch switches, visual diffs, Copilot commits, AI reviews, inline comments &#8211; 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.<\/p>\n<p>To see these features in action, watch this Visual Studio Toolbox episode with Leslie Richardson and Leah Tran.<\/p>\n<p><iframe src=\"\/\/www.youtube.com\/embed\/5Y43j3AylxE?si=tli-pq56rkzVHKE4\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Try it out and let us know what other Git topics you want to know more about in the comments below.<\/p>\n<p>Happy coding!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You\u2019re a .NET developer with a busy morning, and an Azure DevOps ticket drops: \u201cLogin endpoint 500s under load.\u201d You\u2019ve got to fix it, review a teammate\u2019s feature branch, and keep your repo clean &#8211; all before lunch. Visual Studio\u2019s Git tools turn this everyday Git workflow of creating topic branches, stashing changes, committing, and [&hellip;]<\/p>\n","protected":false},"author":642,"featured_media":255160,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[431,1386,7019],"class_list":["post-255159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-git","tag-source-control","tag-visual-studio-2026"],"acf":[],"blog_post_summary":"<p>You\u2019re a .NET developer with a busy morning, and an Azure DevOps ticket drops: \u201cLogin endpoint 500s under load.\u201d You\u2019ve got to fix it, review a teammate\u2019s feature branch, and keep your repo clean &#8211; all before lunch. Visual Studio\u2019s Git tools turn this everyday Git workflow of creating topic branches, stashing changes, committing, and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/255159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/642"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=255159"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/255159\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255160"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=255159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=255159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=255159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}