上QQ阅读APP看书,第一时间看更新
Getting ready
In this recipe, we'll see how we can initialize a Git repository locally, and then we'll use the ASP.NET Core MVC project template to create a new project and version it in the local Git repository. We'll then use Visual Studio Code to interact with the Git repository to perform basic operations of commit, pull, and push. You'll need to set up your working environment with the following:
- .NET Core 2.0 SDK or later: https://www.microsoft.com/net/download/macos
- Visual Studio Code: https://code.visualstudio.com/download
- C# Visual Studio Code extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
- Git: https://git-scm.com/downloads
- Git for Windows (if you are using Windows): https://gitforwindows.org/
The Visual Studio Marketplace features several extensions for Visual Studio Code that you can install to enhance your experience of using Git:
- Git Lens (https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens): This extension brings visualization for code history by leveraging Git blame annotations and code lens. The extension enables you to seamlessly navigate and explore the history of a file or branch. In addition to that the extension allows you to gain valuable insights via powerful comparison commands, and so much more.
- Git History (https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory): Brings visualization and interaction capabilities to view the Git log, file history, and compare branches or commits.