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 [plain] git push origin branch_name if the remote server does not 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 before deleting a branch [plain] Git checkout B git branch-d a delete a remote branch [plain] git push origin -- delete branch_name merge local branch [plain] git merge B assume that the current branch is 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.