Creating and Merging branch operations using Tortoisegit

Source: Internet
Author: User

First step: Create a local branch

Right-click to select Tortoisegit, select Create Branch ..., fill in the name of the new branch in the Branch box (if "Switch to New Branch" is selected, go directly to the new branch, save the second step), click the OK button:

Step two: Switch to the newly created branch via "Switch/checkout" and click OK:

The third step is to perform the push operation under the new branch, leave the remote branch blank in the dialog box, click OK, and the new branch will be created remotely (when the remote server discovers that the remote does not have the branch at the time of push, it automatically creates a branch with the same name as the local branch. and upload the contents of the local branch to that branch).

Fourth step: The other Members switch the new branch:

The pull operation is performed first, then the branch is switched (for example, the second step)

Fifth Step: Partition merging

Before branching, we need to identify which branch will be merged into which branch, first through "switch/checkout" switch to the trunk branch (such as the Develop branch), and then through the "merge" following the merge operation, in the dialog box select the branch to be merged.

Once the branch merge succeeds, we can upload the merge to the hub server through commit and push operations.

Sixth step: Delete a branch

The branch can be deleted when we have merged the new branch into the main branch, or when we discard the branch.

First, open the dialog box with "Checkout/switch", click the More button after the branch entry in the Switch to area, open the Branch list dialog, right click on the branch you want to delete, select Delete Branch to delete.

Note that when you delete a remote branch, the local branch is not deleted, which also indicates that the local branch has no affiliation with the remote branch.

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.