Home >Development Tools >VSCode >How to add files to git using vscode
1. First, we need to register a GitHub account, and then log in
2. After entering GitHub, we need to create a new repository, click New repository, and the page after entering is as follows :
3. Open the newly created library on GitHub, click Clone or download, then click the file icon with the arrow on the right, and copy the address
4. Continue to enter git remote add origin
https://github.com/yhlp/display.git
5. Enter git push -u origin master
. After running, we will find an error
This is because there is no README in the library. After downloading the md file, we only need to enter git pull --rebase origin master
. After the execution is completed, we will find that there is an additional file in the left folder
6. At this time, we execute git push -u origin master
. After the execution, the file has been successfully submitted to GitHub
Finish!
Recommended tutorial: vscode tutorial
The above is the detailed content of How to add files to git using vscode. For more information, please follow other related articles on the PHP Chinese website!