git simple to use (next article)

Source: Internet
Author: User

One, GIT branch management

In the beginning, Master is a line, Git uses master to point to the latest commit, then head to master to determine the current branch, and head is to point to the current branch.

1. Create a Release-branch branch

$ git checkout-b release-branch

Switched to a new branch "Release-branch"

2. View all Branches

$ git branch //The branch name you are using will have a *

3. Switch back to the master branch

$ git checkout Master

switched to Branch "Master"

4. Combine the code developed in Release-branch with the master branch

$ git merge release-branch

5. Delete a branch

$ git branch-d release-branch

Ii. resolution of the conflict

1.git use <<<<<,=====,>>>>> to mark the contents of different branches,

2. Manually resolve the conflicting file, then git add "conflict file" and then submit

3. View branching consolidation: $ git log--graph--pretty=online--abbrev=commit

git simple to use (next article)

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.