How do I update the code on GitHub?

Source: Internet
Author: User

Update the code on GitHub

First, cloning code

1. First clone the code on GitHub to local (download to local)

Step 1. Create a new folder (to store the downloaded code)

Step 2. Open cmd in the folder

Enter download instructions to download your profile on GitHub

git clone https://github.com/CSwuyp/socket.git//This is the address of your GitHub profile.

  

Note: There are two ways to clone code here, one is the above method, the other is to go directly to GitHub to download the corresponding profile and then the operation is the same.

Second, git Status View status
1. To view the current Git repository status, you can use git status

git status

2. If you enter Git status in the folder you just created, you will be prompted that the Git directory is not correct.
3. Switch to socket with CD command first repository directory
4. Then enter GIT status to see the on Branch master, which is already on the master.

Third, update the code
1, in the Socket folder finer things, such as I want to update the previous project files on GitHub, at this time I just need to replace the file to the new one.

2. After the update, use git add *--represent update all

git add *

3. Then enter git commit-m "update description", commit just commit to cache area

git commit-m "Update"

 

4, if more than one person to develop maintenance code at the same time, you have to git pull, pulling the current branch of the latest code

Git pull

  

5. Finally GIT push Origin master, the last step is push to the remote master branch

This is because we haven't explained which GitHub we're uploading to, so we're going to abort the mission and let you enter the account you want to upload before you can continue uploading.

Once the upload is successful, we'll see the corresponding profile update on GitHub, and our previous update note says that update will appear here as well.

How do I update the code on GitHub?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.