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?