GIT Create branch commit remote Branch

Source: Internet
Author: User

1, create a new branch from an existing branch (such as from the Master branch), create a dev branch

git checkout-b Dev

2, can be viewed once created, branch has switched to Dev

Git branch

* Dev

Master

3, submit the branch to the remote repository

Git push Origin Dev

4, test from remote get dev

Git pull Origin Dev

or:

If you run git fetch with the command line, you can get the remote branch information locally and run git checkout-b local-branchname origin/remote_branchname   You can map a remote branch to a branch that is named Local-branchname   locally

5, I think it's important to set up git push,pull default commit fetch branch, so it's easy to use GIT push commit information or git pull to get information

Git branch--set-upstream-to=origin/dev

To cancel a trace of master

Git branch--unset-upstream Master

6, now casually modify the contents of the project file, and then git commit, git push, then you can directly submit to the remote Dev branch, but not the master


GIT Create branch commit remote Branch

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.