[Learning and organizing] How to upload to GitHub

You can refer to this article: Use git tools to upload local project files to github and several common operations

Summary steps:

  1. Create a new empty folder locally, the name is in English, right click on the folder to open Git Bash, enter the commandgit init
  2. Copy the project to this folder and enter the commandgit add .
  3. Then git commit -m "注释内容"submit the project to the warehouse by
  4. Enter the command ssh-keygen -t rsa -C "注册GitHub时使用的邮箱"to create an SSH key, press Enter, the folder can be given by him by default, passphrase can be entered or not, remember to enter it, and you will need it later (because I built it for the second time, so I have id_rsa at the beginning , choose direct coverage here)
  5. Set up the SSH key on GitHub, create a new remote warehouse, or not, use the existing one
  6. By git remote add origin [email protected]:账户名/仓库名.gitassociating the local warehouse with the remote warehouse
  7. Finally, by git push -u origin masterpushing the project of the local warehouse to the remote warehouse (that is, Github), because the default branch of the warehouse is main, when we upload it to the master, the warehouse will help us create a new branch called master, and Push the project in the local warehouse to the master

The above link is very comprehensive, and the personal test is effective!
insert image description here

Guess you like

Origin blog.csdn.net/qq_45746168/article/details/129541037