{"id":231158,"date":"2020-11-12T08:00:46","date_gmt":"2020-11-12T16:00:46","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=231158"},"modified":"2020-12-08T12:03:09","modified_gmt":"2020-12-08T20:03:09","slug":"announcing-the-release-of-the-git-experience-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/announcing-the-release-of-the-git-experience-in-visual-studio\/","title":{"rendered":"Announcing the Release of the Git Experience in Visual Studio"},"content":{"rendered":"<p><span style=\"font-size: 12pt;\">We\u2019re excited to announce that our new Git tooling is now the default source control experience in Visual Studio 2019, beginning with <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2019-v16-8\/#git-productivity\">version 16.8<\/a>. We&#8217;ve been working on this experience over the last year, <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/exciting-new-updates-to-the-git-experience-in-visual-studio\/#brand-new-git-repository-window\">iterating based on your feedback<\/a> to build out key features, enhance performance, and fine tune quality. Above all, we\u2019ve focused on improving discoverability for your common workflows and simplifying navigation to reduce context-switching. Regardless of whether you are part of a large team or working on a personal project, whether you are an experienced developer or just starting out, we strongly believe the <a href=\"https:\/\/www.youtube.com\/watch?v=UHrAg3iKoe0&amp;t\">new Git experience in Visual Studio 2019<\/a> will have something for you. Here&#8217;s seven reasons why we think you should try it out.<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/\" target=\"_blank\">Download Visual Studio<\/a><\/div><\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-overview.gif\"><img decoding=\"async\" class=\"size-full wp-image-231073 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-overview.gif\" alt=\"Git Productivity Demonstration in Visual Studio 2019 v16.8\" width=\"2048\" height=\"1238\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 10pt;\"><em>Git Productivity in Visual Studio 2019<\/em><\/span><\/p>\n<h3>Redesigned Git repository creation<\/h3>\n<p><span style=\"font-size: 12pt;\">To get started with Git, Visual Studio lets you add your local code to Git and GitHub with a single click. The <strong>Create a Git repository<\/strong> dialog contains the <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/github-accounts-are-now-integrated-into-visual-studio-2019\/\">new integrated GitHub sign-in flow<\/a>, similar to what we offer for Microsoft accounts. Here, you can set the repository to be publicly visible or switch it to private. That makes it securely accessible to only you and any designated collaborators. In addition to GitHub, you can also push your code to an existing remote repository. This can be one you\u2019ve already created on Azure DevOps or any other provider. And finally, you can choose to create a local-only Git repository if you are not ready to push to a remote host.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog.png\"><img decoding=\"async\" class=\"aligncenter wp-image-231166\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog.png\" alt=\"Image createrepodialog\" width=\"881\" height=\"664\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog.png 1612w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog-300x226.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog-1024x771.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog-768x578.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/createrepodialog-1536x1157.png 1536w\" sizes=\"(max-width: 881px) 100vw, 881px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Create Repository dialog<\/em><\/p>\n<h3>Accessible top level Git menu<\/h3>\n<p><span style=\"font-size: 12pt;\">You can now access your favorite Git features using the top level Git menu. It&#8217;s at easy reach through the Alt+G keyboard shortcut. This menu also has the Local Repositories submenu. By expanding it, you can easily switch between local Git repositories you have previously opened in Visual Studio.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist.png\"><img decoding=\"async\" class=\"aligncenter wp-image-231165\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist.png\" alt=\"Image 16 8 P3 reposlist\" width=\"901\" height=\"479\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist.png 2035w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist-300x159.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist-1024x543.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist-768x408.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P3_reposlist-1536x815.png 1536w\" sizes=\"(max-width: 901px) 100vw, 901px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Git menu with Local Repositories list<\/em><\/p>\n<h3>View files in Solution Explorer<\/h3>\n<p><span style=\"font-size: 12pt;\">After you&#8217;ve opened or cloned a Git repository, Visual Studio helps you get straight to your code. Solution Explorer loads the root of the repository and scans the directory for any View files. Instead of having to search for your .sln file to open it, Visual Studio detects and loads the solution automatically. If your repository has more than one .sln file, then Solution Explorer shows you the list of available views to choose from. Subsequently, you can toggle between the currently open Solution (view) and the list of Views by using the Switch Views button in the Solution Explorer Toolbar.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P2_listofviews.png\"><img decoding=\"async\" class=\"aligncenter wp-image-231167\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P2_listofviews.png\" alt=\"Image 16 8 P2 listofviews\" width=\"500\" height=\"296\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P2_listofviews.png 692w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/16.8_P2_listofviews-300x178.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Switch Views in Solution Explorer<\/em><\/p>\n<h3>Streamlined inner loop Git Changes window<\/h3>\n<p><span style=\"font-size: 12pt;\">The new Git Changes window is designed to provide quick access to commonly used Git operations that you need while you are coding. You can create new branches, stash, stage, amend, and commit changes, all from the same place without switching pages or losing context. Moving to the top of the window, you&#8217;ll see handy fetch, pull, and push buttons. They allow you to sync commits and tags with your remotes (that&#8217;s right, multiple remotes!). The Git Changes window also has an indicator displaying the number of outgoing and incoming commits. This indicator functions as a link to take users to the Git Repository window. From there, you can view a summary of your outgoing and incoming commits before you sync.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/gitchangeswindow.png\"><img decoding=\"async\" class=\"aligncenter wp-image-231171\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/gitchangeswindow.png\" alt=\"Image gitchangeswindow\" width=\"504\" height=\"662\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/gitchangeswindow.png 714w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/gitchangeswindow-228x300.png 228w\" sizes=\"(max-width: 504px) 100vw, 504px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Staged Changes and Stashes in the Git Changes Window<\/em><\/p>\n<h3>Full screen Git Repository window<\/h3>\n<p><span style=\"font-size: 12pt;\">If you like browsing and managing your repository, you no longer need to leave Visual Studio. The new Git experience comes with a rich Git Repository window that makes it easy to visualize the entire history of your repository. You can right click on a branch to perform operations like merge, rebase, reset, and cherry pick. Moreover, the Repository window is accessible through the Git menu, the View menu, and the status bar.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1.png\"><img decoding=\"async\" class=\"aligncenter wp-image-231177\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1.png\" alt=\"Image GitRepoWindow\" width=\"1193\" height=\"422\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1.png 1662w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1-300x106.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1-1024x362.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1-768x272.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/GitRepoWindow-1-1536x543.png 1536w\" sizes=\"(max-width: 1193px) 100vw, 1193px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Branch History in the Git Repository Window<\/em><\/p>\n<h3>Enhanced merge conflict resolution<\/h3>\n<p><span style=\"font-size: 12pt;\">If you run into a merge conflict, Visual Studio now guides you through the process of resolving it. The Git Changes tool window clearly lists unmerged changes. Also, it displays a status message specifying that conflict resolution is in progress. Further, a gold info bar in the conflicting file prompts you to open the Merge Editor. Once you&#8217;re there, the three-way Merge Editor takes you through each conflict in the file. In other words, it allows you to compare lines and even individual word-level differences. Moreover, you can accept all current or incoming changes at the file level with a single click.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-merge-editor.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-231173\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-merge-editor.png\" alt=\"Image git merge editor\" width=\"935\" height=\"639\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-merge-editor.png 935w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-merge-editor-300x205.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-merge-editor-768x525.png 768w\" sizes=\"(max-width: 935px) 100vw, 935px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Merge Conflict Resolution with the Merge Editor<\/em><\/p>\n<h3>Customizable experience<\/h3>\n<p><span style=\"font-size: 12pt;\">We want you to be able to personalize your Git experience. To change any of your preferences at the repository level or the global level, go to <em>Git \u2013 Settings <\/em>in the menu bar. This will take you to the consolidated <em>Tools \u2013 Options<\/em> pane for Source Control.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-Settings.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-231174\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-Settings.png\" alt=\"Image Git Settings\" width=\"822\" height=\"602\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-Settings.png 822w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-Settings-300x220.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/Git-Settings-768x562.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Git Settings in Tools &#8211; Options dialog<\/em><\/p>\n<p><span style=\"font-size: 12pt;\">However, if these features aren&#8217;t working out for you, it&#8217;s possible to revert back to the full Team Explorer experience. Go to <em>Tools \u2013 Options \u2013 Environment &#8211; Preview Features <\/em>and toggle the <strong>New Git user experience<\/strong> checkbox. Please <a href=\"https:\/\/www.surveymonkey.com\/r\/168GA-Git\">let us know<\/a> why!<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-preview-feature.png\"><img decoding=\"async\" class=\"aligncenter wp-image-231175\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-preview-feature.png\" alt=\"Image git preview feature\" width=\"1151\" height=\"258\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-preview-feature.png 1374w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-preview-feature-300x67.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-preview-feature-1024x230.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/11\/git-preview-feature-768x172.png 768w\" sizes=\"(max-width: 1151px) 100vw, 1151px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>New Git user experience Preview Feature flag<\/em><\/p>\n<h3>This is just the beginning<\/h3>\n<p><span style=\"font-size: 12pt;\">To summarize, from the new Git menu, you can clone, create, or open repositories. You can use the integrated Git tool windows to commit and push changes to your code, manage branches, sync your remote repositories, and resolve merge conflicts. Find the full list of capabilities in the <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/releases\/2019\/release-notes\">Release Notes<\/a>. Learn how to use the features in our <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/git-with-visual-studio?view=vs-2019\">documentation<\/a>. Most importantly, join the conversation on <a href=\"https:\/\/aka.ms\/vsgitsuggestions\">Developer Community<\/a> to weigh in on what we&#8217;re building next. And please provide <a href=\"https:\/\/developercommunity.visualstudio.com\/content\/idea\/post.html?space=8\">feedback<\/a> as we continue to enhance the Git experience in Visual Studio!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re excited to announce that our new Git tooling is now the default source control experience in Visual Studio 2019, beginning with version 16.8. We&#8217;ve been working on this experience over the last year, iterating based on your feedback to build out key features, enhance performance, and fine tune quality. Above all, we\u2019ve focused on [&hellip;]<\/p>\n","protected":false},"author":3029,"featured_media":231171,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[431,6758,4381],"class_list":["post-231158","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-git","tag-git-integration","tag-github"],"acf":[],"blog_post_summary":"<p>We\u2019re excited to announce that our new Git tooling is now the default source control experience in Visual Studio 2019, beginning with version 16.8. We&#8217;ve been working on this experience over the last year, iterating based on your feedback to build out key features, enhance performance, and fine tune quality. Above all, we\u2019ve focused on [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/231158","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\/3029"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=231158"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/231158\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/231171"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=231158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=231158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=231158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}