GIT branch-system command Summary

Source: Internet
Author: User

The GIT branching structure is just the tree and then merging.

1. Switching of branches and Merging

  Git checkout-b new-branch-name: You can quickly build and switch to a new branch.

git checkout branch-name: You can quickly switch to a branch.

Git branch: You can show all of the current branches.

Git checkout-d branch-name: can be used to delete a branch.

Git merge branch-name: Used to merge the current branch and other branches.

@warning: Git status View current conflict; Git: Turn on graphical tools to compare. It's good to commit the final commit directly.

  

  2. Management of Branches

  Git branch-v: Show the current branch and the last log submitted

Git branch--merged: show the currently merged branch

Git branch--no-merged: Show branches that are not currently merged

  3. Remote BRANCH

  Git remote add-on, git remotes rename renamed

git fetch remote-name: Pull data from a remote database

git push resposity-name branch-name: Push Local data

Git merge reposity-name/branch-name: Merge remote Data with Local.

Automatic tracking of direct checkout from the remote branch (git checkout--track origin/serverfix).

So you can use the following command to make the new and push:

Git push,git Pull

  

Delete:git push [remote name]: [branch name]

GIT branch-system command Summary

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.