Xiaobai Training Camp Lesson 3 - Code
How to create a new repository (over HTTPS) from the command line
Hi, everyone, in the Step4 content of creating a repository in the first lesson, we mentioned that if the option "Initialize the repository" is not checked during the repository creation process, then the repository page you created will be displayed like this:
So how to upload files?
Today, I will teach you how to create a new repository from the command line based on HTTPS, hoping to share relevant experience with other Xiaobai in need.
First, let's take a look at the final effect of the course, the page after successfully submitting a README.md file should look like this~
If you have no technical background like me, there may be a little confused when you come to the code page after creating the repository. What's next? What to do? How do people's code pages full of files come up?
After learning this lesson, you will find that it is very simple~ Well, let's implement it in 3 steps!
(PS, this process requires the use of Git tools, please refer to Lesson 2 for the specific tutorial on downloading and installing Git~)
Step1. Create a folder with the same name as the repository locally
Step2. Enter the folder, right-click and select [Git Bash Here], a command window will pop up.
Step3. According to the command statement prompted on the page, enter the command window in turn and press Enter to execute
Press Ctrl+C on the page to copy touch README.md, go back to the command window and press Shift+Insert to paste or input directly, then press Enter;
After the previous step is completed, continue to copy and paste git init, and press Enter;
Then copy and paste git add README.md and press Enter;
Repeat the operation until the last command git push -u origin master is executed, and the command is executed.
At this point, we have completed the creation of the new repository. After returning to the page to refresh, our page has completed the first commit, and the README.md file has been uploaded successfully~~