Step 1: Create your Repository on Github.


Then fill in the following,

1 fill in the project name of your project, 2 select, and click 3 to confirm.

That’s it, and note the HTTPS address

Then create your local Git repository and use the command line to go to the folder where you need to upload your code.

Step 1: Create a Git repository

git initCopy the code

Step 2: Add the project file to the repository

git add .Copy the code

Step 2: Submit instructions

git commit -m "Submit instructions, say what you submit."Copy the code

Step 3: Connect your local repository to Github and the following HTTPS is the address you just asked you to record

git remote add origin https://github.com/***/Text.git
Copy the code

Step 4: Get the remote library and merge with the local synchronization (this step is necessary if the remote library is not empty, otherwise the later lift will fail)

git pull --rebase origin masterCopy the code

Step 5: Upload code to github remote repository

git push -u origin masterCopy the code

Finally: status query command

git statusCopy the code


Update the code

Step 1: Check the current git repository status

$ git statusCopy the code

Step 2: Update the code

$ git add *Copy the code

Step 3: Submit the update description

$ git commit -m "Updated instructions"Copy the code

Step 4: Git pull to get the latest code from the current branch

$ git pullCopy the code

Step 5: Push to the remote Master branch

$ git push origin masterCopy the code

So that’s basically OK.


Download the code from Github

Step 1: Copy the HTTPS address



Step 2: Enter the command directly download

$ git clone https://github.com/***/Test.gitCopy the code

You can also click Download ZIP to complete the Download without using the terminal.


Delete unnecessary repositories



Then scroll down to the bottom of the page, find the Delete This Repository button, click on it, and enter the name of the repository you want to Delete in the window that pops up