Git uploads code, merge code, branch-related

Source: Internet
Author: User

1. Upload local code to git:
(1) Git remote add origin [email protected]:D Awang/wechat-waiwei-hunter-new.git
(2) git Add.
(3) Git commit-m "comments"
(4) Git push-u Origin Master

2.git Branch Merge to Trunk
(1) Submit the branch code to the branch, then switch back to the trunk

(2) pull down all code

(3) Git merge xiahuyouhua02 (branch name)

(4) Push all code

3.git Trunk Merge to Branch
(1) Submit the branch code to the local repository and then cut back to the trunk

(2) pull down all the code and then cut back to the branch

(3) Git merge master (skeleton name)

4.git Branch Related
Create a new branch locally: Git branch Branch1
Switch to your new branch: Git checkout Branch1
Post a new branch on GitHub: Git push Origin Branch1
Delete a branch locally: Git branch-d Branch1
Delete a branch on the remote side of GitHub: Git push origin:branch1 (the colon before the branch name means delete)

Git uploads code, merge code, branch-related

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.