Pure small white, the department god has operated the warehouse building steps, afraid of not remembering, write down for reference ~~~

1. Add existing projects to the repository

Steps:

1. Create a new repository on GitHub

2. Use VScode (any programming tool can be used) to open the existing project, enter the following command line statement (currently using the second type)

Note: Some errors are easy to occur:

  1. An error occurred after entering the last sentence:
Git remote add origin************** fatal: remote origin already exists.Copy the code

Online solutions:

Run git remote rm origin. 2. Run git remote add origin **************Copy the code

2. Request timeout:

git push -u origin main
fatal: unable to access '**************': Failed to connect to github.com port 443: Timed out
Copy the code

Try again later

If you encounter problems, you can add ~~~

2. Add a brand new project to the repository (nothing)

Steps:

1. Create a new repository on GitHub.

2. A project must have a folder. Create a folder

3. Open this folder with vscode

4. Enter the corresponding command line statements (the first type).

Perfect! Xiaobai has learned a new thing and is looking forward to opening the door of GitHub

Added a thief 6 operation carried from:csdn

Fixed an issue where clone code was often unsuccessful on GitHub

Git clone problem: fatal: unable to access "https://github.comxxxxxxxxxxx" : Failed to connect to XXXXXXXXXXXXX Failed to connect to XXXXXXXXXXXXXCopy the code