 Forget about ever having to swap back and forth between the terminal, the browser, and Visual Studio to perform all of your Git-related version control tasks because we have now completely transformed the Git integration experience within Visual Studio. So find out on this episode of VS Toolbox. Hello, everyone. Welcome to Visual Studio Toolbox. I'm your host, Leslie Richardson, and today I am joined by PM's Prateet Narragota and Tessir Garfal. Welcome, y'all. Hello. Hey, Leslie. What's up? Not much and join a very hot heatwave going on in Seattle right now and checking a crap ton of water. So the two of you are PMs on the version control team for Visual Studio, and I hear we have some new developments in the Git integration space, if you want to tell us more about that. Yeah, absolutely. So we have been working hard on updating or revamping the whole Git experience inside of Visual Studio, and we have been doing that for a couple of months now, and so we are super, super excited to talk about what we have so far. A popular question we have been getting is, why do you guys doing this? And so it's interesting actually when we started to ask users about what they think about the Git experience inside of Visual Studio, a very popular answer was what Git experience, right? I don't see any. So the previous tooling that we had was super not discoverable for lots of users. It is called Team Explorer, and so lots of people didn't really know what that is about. Yeah. Yeah, and then so lots of those who are using it also, like we're complaining about the user experience and the context switching, and so like they have to go to the branches page to create a new branch and then go to the changes page to commit the change and then go to the sync page to fetch pull or push. And so there were all of these different pages that they needed to navigate between, and so that was super painful for our users. So we decided to take a step back and revamp the whole experience. Cool. I can definitely relate to the whole Team Explorer thing. I remember when I first started working on Visual Studio, I don't think I realized that the Team Explorer stuff was version control related until a couple months in. So yeah, until before then, I was just kind of sticking to the terminal for all my Git needs. Yeah, totally. And even Team Explorer itself was built on Team Foundation version control, Microsoft's other version control system, and sure Team Explorer is still gonna support that, but we did wanna build something that was more Git specific. Awesome. Well, I'd love to see what's new. Yeah, let's actually share my screen to show you some of the new stuff here. As you can see here, I have Visual Studio open and this is just an empty C-Sharp new project. It's the Hello World console project. And so I don't have any source control set for this project, so I still see the add to source control entry point down there, but you can also see the new Git changes tool window down there next to solution explorer instead of Team Explorer. And so if you open that, you get an ability to either clone or create a Git repository. So particularly later on, we'll go over the clone flow, but for me now, I would like to show you the create Git repo flow. So you can actually get to that either by clicking on this button here or using the entry point on the status bar there or even using the new top level Git menu over there. So like you can click on create a Git repo and that would open the all new create a Git repository experience, which is really cool because with a single click of a button, you can create a new repo and push it to GitHub in a single step. That's cool. So is all of this available in Visual Studio by default or is there a particular version that people are going to need to upgrade to in order to use it? Yeah, so this is actually a pretty plans to go over the specifics of how users can enable this later on, but in general, this is accessible from all versions of Visual Studio 2019, the preview version and the publicly available stable version as well. Great. Yeah. So yeah, in this case, like the thing I just need to do is just to create and push and that will initialize a local Git repo, create a new GitHub repo for me and make it a private by default and then push my code to GitHub all in one step. But then I can still use to choose to create an only local repo in this case if I want or if I already have an empty remote repo, I can also choose that and provide the URL and that will also like push my code to that existing repo. Neat. That's so much better than, I know the option is still there for those who like it, but in the bottom right corner, the add to source control thing that if you're not looking down there, you can easily miss it if you're trying to create the repo, so. Absolutely. Yep. Yeah, it's nice to have this in your face interface in order to create the repo instead. Absolutely. It's accessible from different locations so that is super helpful. Yeah. And now handing it over to pretty cool, go over the clone flow and show you other things. Okay. Yeah, thanks Tess here. And so creating a new Git repository is one way to get started with Git. The other way is to clone an existing repository. So I have Visual Studio 2019 launched in front of me right now and this is the start window where you can get to code in different ways. One of the ways here we have is to clone a repository. Clicking on that takes me to a simple dialogue where you can either enter a repo URL if you already have grabbed that URL by going to the browser, someone's given you the URL and then clone it down, but you can also browse for your repositories if you're on Azure DevOps or GitHub that these flows allow you to sign in and just look at your existing repositories so that you don't need to go to the web and find the URL and copy paste that you can just select a repo here. Right now I have a repo URL with me so I'm just gonna paste it into the text field. This is just a test app and I'm gonna go ahead and clone that down. So what Visual Studio is gonna do is it's gonna open up. You can see kind of the changes window that Tasia was talking about and you can also see a new cloning progress dialogue. This is gonna... Oh, I'm just saying that's great. It's nice to see the feedback like that. Yeah, so the progress was something that we were missing for cloning and you'd have to like go down to the output window to know that something was happening and specifically super long clones would take some time and the user would not get really that much feedback and so we have the dialogue to show you that you're cloning and you have the option to continue in background which will push the dialogue to the background and during that time you can go and do something else while the clone is taking place. It's great since the output window is already so polluted sometimes or sometimes there's just a lot going on so it's nice to have that separation. Totally and now you can see that my get changes window here is populated. This is one of the new windows that we have for on the side experiences while you're coding. So the window is always on the side. I can select my branch from here, pull, push or even fetch from this branch. I can also create a new brand so I'm gonna go ahead and do that because there's one thing I wanna make a change to in this repo so I'm gonna create a new branch, string change and base it on master and also check out the brand. So I'm gonna create that branch really quick and I can also see if I have any changes or stashes. I have none right now so right now it's empty but I'm on the new branch right now that I've just created. So in many ways it looks very similar to the previous test explorer window. Just it looks a lot cleaner to me. So I noticed like the push and pull buttons for instance, those are new, right? Yeah, we based it off of that as well as the changes to have in team explorer but we wanted to have a single tool window that kind of gives you all the on the side experiences that you want while you're coding without having to context switch to a different tool or to the command line in order to do these actions that are related to git. Great. And so now that I've changed my branch I'm gonna go check out the files that I've just cloned down. So I'm searching over to solution explorer and in solution explorer you see we have a new experience here as well. The repo that I've just cloned has two different solutions. It's not a single solution repo that many developers are accustomed to. Some use cases have more than one solution in a single repo and so Visual Studio here presented me with the folder to open the folder or either of the solutions that are in this repo. If I have a single solution in the repo then Visual Studio will directly open and load that solution for me and if I have zero solutions in the repo then it will just open up the folder view of that repository. That's pretty sweet. That seems like a prominent customer ask, right? I'm sure a lot of people were wondering if that could be a thing in the future. Yeah, it was definitely something that we wanted to fix because after cloning a repository we didn't really help you get to the code that you wanted to see. Most of the times you wanna kind of get to the solution that you wanna open and so how do we help you find the solutions and help you choose the solution that you wanna open and so double clicking on a solution in the list will just pop me into that solution view now. I can always get back to my list of solutions by clicking on the switch views button that's up here in the toolbar of solution explorer. Awesome. And so I'm gonna just make a quick change over here. So opening up the files, I'm gonna open up program.cs and I see that it's a simple command line application says hello everyone. I'm not super used to seeing hello everyone. I'm gonna change that to our hello world. So unique. And now we've gotten back to that. I'm going to, I can even, I wanna commit that change now. So right here I'm in my file. I'm gonna right click on the file name and I have a git option in the context menu and from there I can directly say I wanna commit her stash station and what that's gonna do is it's gonna pop open my git changes window again so that I can see the changes here. I have the change that's right here with the plus button. I can stage that change and then enter a commit message, changed everyone to world and commit that change. So that commit is now ready for me and it's locally available for me. I have a success message that tells me that right here. I can also see that I have one outgoing commit. This will take me to, clicking on this will take me to another flow that Taser will get into. But for now I have that single change and I just wanna push that change to my repo. So I have a push button right here and just gonna click on that. It's gonna give me status saying that I'm pushing the branch. The status is also kind of progress is displayed here on the bottom left while it's pushing in case pushing takes some time and I have a notification successfully pushed string change to origin. And what's really cool is since if I'm on a repository that's forked and I want to merge those changes into the upstream I can also directly create a request right from here. This link will take me to the browser and step me right into the pull request flow. That's new, right? The ability to just jump immediately to the browser from a pull request, cool. Yeah, and it doesn't matter what remote you're on. It'll take you to the appropriate remote GitHub or anywhere else and straight into the create. That's so convenient. Yeah, especially if you have a ton of repos and you just don't remember where in your giant list it is on the browser. So. It's helping that context switching whenever you have to switch between your different tools you wanna make that as easy as possible so you don't waste time on it. Okay, sure. Prateek said that you have the intel on everything there is to know about a secret button that has recently been added to the Git window. Can you show us some more of that? Absolutely, yes. So let me actually share my screen one more time here to show you guys what's going on. Yeah, so Prateek demoed the new Git changes window which is a part of the inner loop on the side Git experience that users will have all the time even when they're coding. But we realized that there are more to the Git experience, there are more complicated flows and experiences that users would want to have a full screen experience to explore with and navigate the repo and do the more complicated tasks. So one of the main actually customer requests that we got on the first version of the new Git experience is the list of incoming and outgoing commits. And this is where the link that Prateek showed us earlier comes into play. So I see here I have a one incoming and one outgoing commit. So this is like communicating that there is one incoming commit from upstream and there is an outgoing commit that I related to the changes that I've been making locally. So if I click on that, I get directed to the full screen repo experience. So this is the brand new full screen Git experience and the new home for the repo browsing and the more complicated Git experiences that you might wanna do, right? That is so exciting to see that you can now look at this map that you normally have to go to the browser for just code NDS. Yes, and this has been a super popular request from our customers and we are so happy that we have this now being a part of Visual Studio. People like that, right? You've been getting good feedback on it? Okay, cool. Yeah, so users have been going to the web or using other tools to get this and now it is a part of their Visual Studio. So absolutely. And so you can look at your incoming and outgoing commits here, but then you can do way more, right? You can look at your local history. You can browse your branches. You see your local branches and the remote branches as well. So with a single click, I can go and look at the feature too. What does that look like? Another single click takes me to feature one and I can browse and see what's going on there. And I can do a right click and manage my branches, right? So I can merge, I can rebase, I can do way more. And everything is visualized in front of me. So that was a big jump forward for the new Git experience here. But that being said, we have actually been improving the flow end to end. So let's assume that you haven't really noticed the one incoming, one outgoing, right? And let's say you are in your code, so making changes and all of a sudden you want to push your changes that you have been making, right? So let me just click on push here and I get this new dialogue, right? That is telling me, well, like looks like there are incoming changes. So would you like to pull and push or do something else, right? And so this is a step forward as well. So previously we really didn't tell the user what's going on. We would just use the output window to show some error messages there. Deal with it, basically, yeah. So yeah, and so in this case, let me choose to pull and push. So this will pull and push. Those are my favorite kind of error messages, the ones that actually give you possible solutions. Yeah, and in this case, I get into a merge conflict, right? So I can- Everyone's favorite. Yes, and I can clearly see that the get changes is telling me that there is a merge conflict in progress. But even if I'm not here, let's say I'm on Solution Explorer and I may have used the top level get menu to push, I still get that message here on the editor, right? So I see like file contain merge complex in this case and with a link to open the merge editor. So clicking on that would open the three way merge experience that we have. So as we can see here, and this is another experience that we have been enhancing based on customer feedback. So now it's even clearer to distinguish between what's incoming and what's current. You can also like check one checkbox and that would allow you to choose current or incoming, right? I'd save some time. Yes, absolutely. And so, yeah, users used to have to check all of the right or the left to do that. And now it's like- And plus with the other view, if you're new to version control, like get like what's the difference between the head and like the other portion, like rack in your brain trying to figure out who's is who's. Absolutely, yes. So now it's easier to distinguish there. We have also been streamlining the toolbar there. So it's way easier to read all of these actions and what they're doing. We kind of like grouped all of the view settings into a single drop down that shows on the right hand side. So these are the settings that you might wanna change from time to time. And that gives you more real state for the more important things that you wanna do while you are on this UI. One other thing that we have also included here is the show word diffs, which makes it super easy to like focus on the specific words that have been changing in this experience. And I can take and coming or take current as well, except merging and that will basically accept the choice that I made. Yeah, so this is another experience that we have been enhancing a lot. That's really cool to see. This seems a lot more intuitive when it comes to dealing with merge conflicts, which I know everyone loves to do just all the time. That's the best part, right? Yeah. So. Yeah, and now let me actually hand it back to Pritik who is going to tell you more about how to enable all of these new experiences. Yeah, so as promised earlier, we wanna show you how to get all of these cool new get features and the functionality for version control Visual Studio. So if you're on the preview channel of Visual Studio, you'll get all of these features on by default. You can toggle them on or off by going to tools, options, and then preview features. If you scroll down, you'll see the new get user experience. And if you're on preview of Visual Studio, you'll get this on by default. You can always toggle it off, toggle it off if you need to, and it'll go back to the previous Team Explorer experience. And if you're on release, it's not on by default yet as we continue to build features iterate on your feedback. So we haven't turned it on by default for release, but you can definitely still try it out. This checkbox is still there. You can go in tools, options, and turn it on. It won't have the super latest features that we kind of demo today, but it will have the get changes window, the get repository window, merge conflict detection. If you're in 16.7 and above for the release channel. And again, we are iterating on this experience. We want to turn this experience on by default so that everyone gets to use it and it is the de facto experience in Visual Studio. So give us feedback, suggest a feature, report a problem. We're me, Tayseer, our engineering team. We're all looking at what you guys are saying, what problems you're reporting, what features you still want in this experience. And we want to address the feedback and continue iterating and building this experience out. So let us know. Yeah, based off of all those changes that we've just explored, it seems like you guys really did listen to a lot of the customer feedback. So we hear you ladies and gentlemen out there. Like definitely respond to feedback. So what's next for the get integration experience in Visual Studio? What can we see in the future? Yeah, so we are, as Pritik said, we are actively working on this new experience, right? So there are things that we are working on today, like including performance enhancement. So if you try this new experience, you'll notice some of those and more of those are coming along the way. So stay posted. We are also actively looking into the user feedback. So based on the feedback that we'll be seeing, we'll be prioritizing our backlog. So we have already an established backlog of lots of the popular customer requests. So, but we wanna make sure that we are reevaluating that list once the user gets a chance to look at this new experience. So that is what we have in top of mind. Great. Well, I can't wait to see more. And as is now, I'm excited to be able to just continue using Visual Studio and not have to swap back and forth between like the terminal or the browser and back and forth until I just die of frustration. So thanks to the Virgin Control team for listening to all that customer feedback and putting it together to create something great. Thank you, Leslie. Thank you. Thank you. Thank you for having us. We're happy to do the work and this has been really fun. Yeah, happy to have you all. And remember, folks, definitely go try out the new experience and until then, happy coding.