In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how vscode uses git to manage code. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
Install the git source code management system
In order to use VS Code to edit the source code, you first need to install the source control system, which is recommended to use Git. If you install Git on Windows, you can download the installer directly from the official Git website.
During the installation of Git, select VS Code as the default editor for Git. The following steps use the default options. Click Next all the time to complete the installation.
1. Configure the global settings of Git
After the installation is complete, use the git config command to set the Git globally:
Git config-global user.name "your name" git config-global user.email "your email address"
Because Git is a distributed version control system, every machine must report itself: your name and Email address.
2. Clone remote library
Create a local library, create a folder locally, and clone a local library from the remote library:
Cd d:/GitTest / / specify the storage directory git clone https://git.oschina.net/name/test.git / / the address of your warehouse
Associate VS Code with Git
From VS Code's main menu File-> Open File, open the local library so that VS Code can use Git for source code management.
Open File Management and you can see the GITTEST local folder, which is the local library managed by Git:
Open Source Control, you can see that SOURCE CONTROL is GIT, click "√" to provide code changes, and explicitly all code changes in the CHANGES list:
Third, use PowerShell script
Assemble the git command using the PowerShell script so that you only need to execute a PowerShell script to commit and synchronize the code:
Git pull origin mastergit add-Agit commit-m'auto commit'git push origin master
In VS Code, to execute the PowerShell script, you first need to set the execution policy, start the PowerShell terminal with administrator privileges, enter the following command, and enter A:
Set-ExecutionPolicy RemoteSigned
Thank you for reading! This is the end of the way vscode uses git to manage code. I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.