Git uploads project files to Github using HTTPS

Git uploads project files to Github using HTTPS

1. Log inGithub and create a warehouse

(1) First click the plus sign and select new repository.
Insert image description here

(2) Next, give the warehouse a name, configure the permission information, and click Create repository to complete the creation of the warehouse.
Insert image description here

(3) Finally, the following interface is obtained
[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-sXtjnjTd-1693302411871) (C:\Users\22285\AppData\Roaming\Typora\typora-user-images\ image-20230829163536180.png)]

2. Return to the local project file to upload the project

(1) Right-click the file of the project to be uploaded to reopenright-click Git Bash Here and use the command line to upload the project.
Insert image description here
(2) Return to the warehouse created on Github and copy the HTTPS address.
Insert image description here
(4) Alias ​​the HTTPS address, the syntax is git remote add alias remote address , use git remote -v View all current remote address aliases.
Insert image description here
(5) Make sure that the file to be uploaded has been added to the local library (git commit), and the pointer points to the branch to be uploaded, and then use
git push alias branch
Upload the Github remote repository.
Enter the command: git push git_demo2 master
Insert image description here
The following interface will pop up:
[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-58yaOoM6-1693302411874) (C:\Users\22285\AppData\Roaming\Typora\typora-user-images\ image-20230829172708533.png)]
You can choose the browser or enter the password, and finally you will get the following Results
Insert image description here

3. The remote repository of Github successfully uploaded the results.

Insert image description here

Guess you like

Origin blog.csdn.net/qq_43762434/article/details/132567035