{"id":228782,"date":"2020-03-30T08:00:51","date_gmt":"2020-03-30T15:00:51","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=228782"},"modified":"2020-11-04T13:17:30","modified_gmt":"2020-11-04T21:17:30","slug":"improved-git-experience-in-visual-studio-2019","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/improved-git-experience-in-visual-studio-2019\/","title":{"rendered":"Improved Git Experience in Visual Studio 2019"},"content":{"rendered":"<p>Last week we released version <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2019-version-16-6-preview-2\/\">16.6 Preview 2 of Visual Studio 2019<\/a>. It contained the first iteration of a revamped Git experience to improve your productivity when working with code on GitHub, Azure Repos, and other hosting services. You can learn more about how to use the entire Git feature set in Visual Studio in our new <a href=\"https:\/\/aka.ms\/vsgitdocs\">documentation<\/a>.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Install Visual Studio Preview<\/a><\/div><\/p>\n<p>You can enable or disable the experience by searching (Ctrl+Q) for <strong>preview features<\/strong>. In the Options window, just toggle the checkbox for the <strong>New Git user experience<\/strong>. We acknowledge that the functionality is still incomplete, with more enhancements coming soon. But we do expect this to be the default experience in the future. So in the meantime, we\u2019re depending on you, the community, to let us know what we should prioritize in order to build what you need.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-228786 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/NewGitUXpreviewfeature.png\" alt=\"Turn on new Git UX preview feature\" width=\"1376\" height=\"320\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/NewGitUXpreviewfeature.png 1376w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/NewGitUXpreviewfeature-300x70.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/NewGitUXpreviewfeature-1024x238.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/NewGitUXpreviewfeature-768x179.png 768w\" sizes=\"(max-width: 1376px) 100vw, 1376px\" \/><\/p>\n<p style=\"text-align: center;\"><em>Turning on the new Git user experience in Preview Features<\/em><\/p>\n<h5>Initialize and Push<\/h5>\n<p>You can now initialize a local Git repository and push it directly to GitHub, Azure Repos, or other remote hosting services (e.g. BitBucket, custom Git servers, etc.) with a single click. If you have an existing project online, you can use the built-in GitHub and Azure Repos browsing experiences to clone your code.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-228821\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/PushtoGitHub.gif\" alt=\"Initialize and push a repository to GitHub\" width=\"2000\" height=\"1266\" \/><\/p>\n<p style=\"text-align: center;\"><em>Initializing and pushing a repository to GitHub<\/em><\/p>\n<h5>Create new branches<\/h5>\n<p>Once your repository is initialized, we want to enable you to focus on your daily development workflows without having to leave your code. You can create branches and commit code changes from the new Git menu and the Git tool window.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-228790 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/CreateBranchCommit_short.gif\" alt=\"Create a branch and commit changes\" width=\"3214\" height=\"2034\" \/><\/p>\n<p style=\"text-align: center;\"><em>Creating a branch and committing changes<\/em><\/p>\n<h5>Manage branches<\/h5>\n<p>Context switching between tools and applications can be a pain. So we&#8217;ve added the ability to manage your branches from within the Git tool window. After working on your new feature or bug fix, use the branch dropdown in the Git tool window to check out, merge, rebase, view history, rename, and delete your branches.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-228822\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/MergeBugFix.gif\" alt=\"Merging and deleting a branch\" width=\"2000\" height=\"1266\" \/><\/p>\n<p style=\"text-align: center;\"><em>Merging a branch and deleting it<\/em><\/p>\n<h5>Resolve merge conflicts<\/h5>\n<p>We understand collaborating with your team and sharing your work is very important, especially so in the current climate with <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-subscriptions-resources-for-remote-learning-and-productivity\/\">increased remote work<\/a>. When it comes to keeping your code up to date, this can be done easily using the fetch, pull, and push shortcuts in the Git tool window. But even when you do your best to stay in sync with the latest code changes, running into merge conflicts is sometimes inevitable. With the improved experience, we&#8217;ve started to make it easier to navigate through and resolve your merge conflicts.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-228823\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/MergeConflict.gif\" alt=\"Resolve a merge conflict\" width=\"2000\" height=\"1266\" \/><\/p>\n<p style=\"text-align: center;\"><em>Resolving a merge conflict<\/em><\/p>\n<h5>Please Share Your Feedback<\/h5>\n<p>This is just the beginning of a new first-class Git and GitHub experience in Visual Studio.\u00a0Please add or vote for <a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\">suggestions<\/a> on the most important functionality that you want us to build or change.<\/p>\n<p>Also be sure to keep these reference images handy for a quick overview of the new Git interface.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-228828\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Tool-Window-Frame.png\" alt=\"Image Git Tool Window\" width=\"1063\" height=\"503\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Tool-Window-Frame.png 1063w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Tool-Window-Frame-300x142.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Tool-Window-Frame-1024x485.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Tool-Window-Frame-768x363.png 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/> <img decoding=\"async\" class=\"aligncenter size-full wp-image-228829\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Menu-Frame.png\" alt=\"Image Git Menu\" width=\"1063\" height=\"491\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Menu-Frame.png 1063w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Menu-Frame-300x139.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Menu-Frame-1024x473.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/03\/Git-Menu-Frame-768x355.png 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/p>\n<p>And finally &#8211; stay safe, stay healthy.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Install Visual Studio Preview<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We just released the first iteration of a revamped Git experience in Visual Studio 2019 to enhance your productivity when working with code on GitHub, Azure Repos, and other hosting services.<\/p>\n","protected":false},"author":3029,"featured_media":228828,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155,1029],"tags":[1396,431,4381,12],"class_list":["post-228782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","category-web","tag-azure-devops","tag-git","tag-github","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>We just released the first iteration of a revamped Git experience in Visual Studio 2019 to enhance your productivity when working with code on GitHub, Azure Repos, and other hosting services.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/228782","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=228782"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/228782\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/228828"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=228782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=228782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=228782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}