Git creates the branch and uploads the code to the new branch

Source: Internet
Author: User
Tags commit
git creates the branch and uploads the code to the new branch Create a branch: I'm a new branch created directly under the project on GitHub, which I'll add later;
two uploading code to a new branch 1$git status: View your branch and modified files:
As shown above, my branch is wnaggenshen_20170104, that is, where the code will be uploaded to the branch, (if the branch is not in the branch where you want to upload the code, use the $git checkout branch name, switch to the branch and then operate). 4 red places indicate files that have been modified, as well as files that will be uploaded.
2 $ git add-a: Add all the files you want to upload (code) and $git status, at which point 4 files turn green, indicating that they will be uploaded to the local library; 3 $ git commit-m ' Here's what to write ' at this time upload Local repository; 4 $ git push is now committed to the remote branch.



Refresh GitHub to see the newly uploaded code.
--------------------------------------------------------------------------------------------------------------- ---------------------------

At the time of the branch merge, "Please enter a commit message to explain why this merge is Necessary,especi" solution: 1 Press ESC in the upper left corner of the keyboard; 2 input: Wq, press ENTER again.








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.