How to configure git in vscode?
Git is integrated in vscode. Many operations can be performed with just a click without writing some git instructions.
But this requires you to configure vscode. Next I will talk about git configuration and password-free upload to github
Recommended tutorial:vscode tutorial
1. Git configuration in vscode
First of all You need to have git installed on your computer, and git has been added to the environment variables in the window computer.
In this way, your computer can use git, but if you want to use git in vccode, you must also configure git.path.
git.path is an exe file path in git. Find the git installation directory on your computer and find the cmd folder inside. The git.exe file inside copies the full path of the file.
Click Settings and find the git.path option in git settings. Copy the settings to the user default settings on the right
Just copy the path of the git.exe file here.
2. The use of git in vacode and password-free upload to github
First command git init to create git related configuration files in the folder, and then execute the following sentences
The current branch is the main branch, which is uploaded to github
In this way, you need to enter the user name and user name of the git warehouse every time you upload Password (here is the username and password of github)
The password-free upload setting of git is, find the .git folder of the folder
The url in the configuration file config
## was originally https://github.com/**&&/ &&&&.git is replaced with https://github username:github password@github.com/&&&&/&& &&.git In this way, you don’t need to enter your account and password every time you push to the github warehouseThe above is the detailed content of How to configure git in vscode. For more information, please follow other related articles on the PHP Chinese website!