Visual Studio Code comes with native support for Source Control systems. Let's see how it integrates with Git.
Originally Visual Studio Code came with native support for Git, but recently, in order to allow support for other systems, also the source control support became an external plugin. At the moment there six SCM provider
Let's have a look at my favorite features of the Git support in Visual Studio Code.
The one I like the most, and was just recently added is the visual representation of which files have changed directly in the file explorer view.
Another feature I like is the diff view, which can be both side by side or inline.
And diff can also be displayed by simply clicking on the gutter.
Another feature I like is the easy procedure for committing code: just type the message and you can commit all the changes. Or you can also choose which changes to commit.
And once committed, the status bar shows that there is a pending commit
Also, in the command palette, there are accessible most of the git commands, like branch, checkout, clone, merge, commit, ecc...
But to really enhance the experience using Git in VS Code, I recommend also checking out two very useful extensions:
- Git history which adds, as the name suggests, possibility of reading the change logs, compare between commits and see a graph of all commits, branches and merges
- Git Lens which adds code lens features (so small overlay next to lines of code showing when and by who it was changed) and much more
This article contained some of the pieces that didn't make into chapter 8 of my upcoming book "Front-end Development with ASP.NET Core, Angular, and Bootstrap" because to volatile for a printed book. So consider this a "bonus" section.
To know more about what I'm publishing, don't forget to check my blog again, subscribe to my RSS feed, follow me on twitter or like the Facebook page of my book.