GIT branch Management

Source: Internet
Author: User

First, the local creation of a warehouse at the time there is no one branch, after a commit, the default is to create a master Master branch

And then through the order

Git push-u Origin Master

By pushing the contents of the local library into the remote library, a master Master branch is also available in the remote library

The same is true of the Dev branch, which is created locally, then pushed directly to the remote, and the Dev branch is available remotely, with the following command

Git push Origin Dev

Second, another situation is: if it is directly from the remote cloned repository, this situation can only be cloned down the main branch, the other branches (including the Dev branch can not be cloned)

Now it's the case that there are two remote branch master branches, and dev branches, but there is only one master branch in the local master

At this point, you need to create a remote branch of the dev branch to local, the command is

git checkout-b Dev Origin/dev

It can then be modified on the local dev branch and pushed to the remote dev branch.

GIT branch Management

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.