Gitbranch common management commands view local branch [plain] gitbranch * devmaster * indicates that the current remote branch is located in the dev branch to view the remote branch [plain] gitbranch -- remoteorigin/devorigin/master to create branch [plain] gitcheckout ... git branch management Common Commands View local branches [plain] git branch * dev master * represents the current dev branch to view remote branches [plain] git branch -- remote origin/dev origin/master to create branches [plain] git checkout-B new_branch note, new_branch code comes from the current branch switch branch [plain] git checkout another_branch and the creation branch is poor-the B parameter pushes the local branch code to the remote server [plai N] git push origin branch_name if the remote server does not have this branch, the remote branch code of pull is automatically created to the local branch [plain] git pull origin branch_name to delete the local branch, switch to another branch first, then you can delete a branch [plain] git checkout B git branch-d a delete remote branch [plain] git push origin -- delete branch_name merge local branch [plain] git merge B assume current branch dev, the above Command is to merge the local B branch code into the current branch dev and merge the remote branch, which is almost the same as the previous one, [plain] git merge origin/B remote branch B is merged into the current local branch dev.
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