😂 first hold back… What did you think I was gonna say? !!!!!!!!! Practice before theory

New Project Operation – clone (download) an existing project from the remote repository to operate locally

Create a new REPO

##2, make sure to create the project by clicking on the red box option, usually need to click on readme.md, have an initialization file

3. Go to the project page

(1)resame.md
Github automatically reads readme.md

(2) Clone or download use HTTPS VS ss

  • Use HTTPS: Each operation requires a user name and password, which is cumbersome
  • Use SSH: This is usually chosen as the address of the project (repository). It is a Git protocol

Here, with my SSH address as project (warehouse) address: [email protected]: wxq393 / blogtest git as an example for demonstration.

Clone existing projects

(1) At this time, open the terminal and use the command line to operate the copied project address under the USE SSH protocol

$  git clone  [email protected]:wxq393/blogtest.git
Copy the code

(2) Error message

Fetal: could notread remote repository
Copy the code

(3) Set the public key

Interstition: What to write on the terminal command line to set the public key? Where to find it? Github homepage: setting — SSH and GPG keys: generating SSH keys

Click and select a new SSH key to generate a prompt for command-line operations (Figure 3) :

Here I continue to explain with my example:

$  ssh-keygen -t rsa -b 4096 -C "[email protected]"
Copy the code

(4) Public key appears

$ cat  ~/.ssh/id_rsa.pub
Copy the code

(5) Go back to github homepage and click: avatar — setting — SSH and GPG keys — SSH keys — (green key) New SSH key

A long list of public keys copied and pasted on the command line in key:

After confirmation, please fill in the github login password to confirm (don’t panic) :

(6) Go back to the terminal to clone (download) the remote repository with Git Clone again, and the clone will be successful. (Since I have set the public key before, if a message like “done” is displayed on the terminal, it indicates that the clone is successful. Not necessarily exactly like me, responding to command line prompts.)

Local vs. remote file submission

Terminal operation a series of processes such as directory change, file creation, local submission and remote library push:

6. Return to the Github project home page

Purpose: Make use of the function of GithubPages in the project Setting to generate code files into online previewable pages. (1) Click the setting on the project to find the option of GithubPages and conduct master Branch

(2) At this point, the save (marked with red box) turns gray and generates a link to the preview page (marked with red line)

7. If you want local editing (like writing), push Github remotely

** Operation: ** repeat step 5 and you can happily do this

** Note: ** This also involves the previous command line operations, such as online vim editing, etc., flexible response. It is written too fine, I am embarrassed to tile operation. ( ̄▽ ̄)”🤣