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