git tortoise to create a new remote branch

Steps to establish a remote branch document Step 1
: Create a local branch
Step 2: Switch to the newly created branch via "Switch/Checkout", click OK:
Step 3: Perform PUSH operation under the new branch, and keep it in the dialog box If the remote branch is blank, click OK, and a new branch will be created remotely (when the remote server finds that the remote does not have this branch during PUSH, it will automatically create a branch with the same name as the local branch and change the content of the local branch. Upload to that branch).
Step 4: Other members switch the new branch:
Step 5: Partition merge
Step 6: Delete branch
Note that the local branch will not be deleted when deleting the remote branch, which also shows that the local branch and the remote branch are not belong.
Step 1: Create a local branch,
right-click and select TortoiseGit, select Create Branch… (create branch), fill in the name of the new branch in the Branch box (if you select "switch to new branch", you will go directly to the new branch, omitting the section Step two), click the OK button:

Step 2: Switch to the newly created branch via "Switch/Checkout" and click OK:


Step 3: Execute the PUSH operation under the new branch, keep the remote branch blank in the dialog box, click OK, and a new branch will be created remotely (when the remote server finds that the remote does not have the branch during PUSH, it will Automatically create a branch with the same name as the local branch, and upload the content of the local branch to the branch).


Step 4: Other members switch the new branch:
first perform the pull operation, and then switch the branch (such as the second step)

Step 5: Partition merging
Before branch merging, we need to clarify which branch will be merged into which branch, first switch to the main branch (such as develop branch) through "Switch/CheckOut", and then perform the merge operation through "Merge". Select the branch to be merged in the box.

After the branch is merged successfully, we can upload the merge to the central server through Commit and PUSH operations.

Step 6: Delete the branch
After we have merged the new branch into the main branch, or abandon the branch, we can delete the branch.

First open the dialog box through "CheckOut/Switch", click the more button behind the Branch entry in the Switch to area to open the branch list dialog box, right-click the branch to be deleted, and select delete branch to delete.

Note that when deleting a remote branch, the local branch will not be deleted, which also shows that the local branch has no affiliation with the remote branch.
————————————————
Copyright Statement: This article is the original article of the CSDN blogger "Fu_Lin_", and it follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting. .
Original link: https://blog.csdn.net/CLinuxF/article/details/84848920

Guess you like

Origin blog.csdn.net/wwf1225/article/details/114576242