Git Learning -- & gt; branch management

Source: Internet
Author: User

Http://www.ruanyifeng.com/blog/2012/07/git.html

Git branch --

Git branch-d <> --

Git branch-D <> --

Git checkout-B <> --

Git checkout <> --

Git merge -- no-ff <1> --

PSGit,

, Backup

5.1

5.2

 

Create branch command

GitDevelop

Git checkout-B develop master

Check the current branch. If there is no branch, it will be displayed below

The current branch. Note that the above is a branch. After the branch is created, it immediately jumps to the branch.

)

)

The branches inside are not the same as those in the branches. The branches inside are directly under another file and folder, saving a copy of all the code so far. However, the Branch does not have this function. After reading the official documentation, I understand that it only sets a pointer to indicate a change point under the modification record of this version, then, all the modifications made before this point belong to this branch or belong to this branch. If you do not understand it, you can also view some information. We recommend that you read the official English website.

Switch Branch

Commands such

Merge some changes under the Branch to the bottom. Run the command to jump to the branch first, and then run the command with parameters.

Because there were no changes just now, the display is the latest record. In addition, after using the branch, we feel that the branch is useless. We can delete the branch.

Delete Branch

To delete the branch, you must make sure that the modification has been submitted before performing the delete operation, but what if we want to force Delete this branch if some modifications are not submitted? What should we do? You can use parameters to implement the force delete function. Here the experiment has not made any changes, so you can use the parameters.

Command.

 

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.