Home >Development Tools >VSCode >How to add files to git using vscode

How to add files to git using vscode

王林
王林Original
2019-11-14 16:49:073678browse

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 :

How to add files to git using vscode

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

How to add files to git using vscode

4. Continue to enter git remote add origin https://github.com/yhlp/display.git

in VS Code

5. Enter git push -u origin master. After running, we will find an error

How to add files to git using vscode

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

How to add files to git using vscode

6. At this time, we execute git push -u origin master. After the execution, the file has been successfully submitted to GitHub

How to add files to git using vscode

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn