How to use Git to upload code to GitHub simple tutorial

study notes

1: Github creates one of its own repositoriesinsert image description here

2: Just give the warehouse a name

insert image description here

3: Next, open git

insert image description here

4: Go to your local file path through cd and enter the path

insert image description here

5: Initialize the project, there will be a .git file after running the code under the directory

git add .    

as shown in the picture
insert image description here

6: Add all files to the local warehouse

git add .

7: Submit the project to the local git warehouse ("first commit" is the note information)

git commit -m "first commit"

8: The local git warehouse is associated with the remote warehouse (you will have this code after creating the warehouse)

insert image description here

9: Push the project to the remote warehouse

git push -u origin master

Guess you like

Origin blog.csdn.net/qq_40514113/article/details/131959425