git- branch

Common Commands

1、

Command: git branch

Role: See all the local branches of the current warehouse

2、

Command: git branch dev

Role: New dev branch based on the current branch

3、

Command: git checkout dev

Action: Switch to branch dev

4、

Command: git branch -d dev

Role: Delete dev branch

5、

Command: git branch -D dev

Role: forcibly remove dev branch

6、

Command: git push origin master: dev

Action: local master branch origin pushed to the distal end of the branch dev

7、

Command: git push origin --delete dev

Role: Delete the distal end of the origin of the dev branch

8、

Command: git merge dev

Role: dev branches merged into the current branch

9、

Command: git checkout -b dev

Role: It is git branch dev abbreviations and git checkout dev these two commands, namely, the current branch to create and switch to dev-based branch

10、

Command: git pull origin dev: test

Action: pulling the distal branches to dev origin of the local branch test

11、

Command: git fetch origin dev: test

Action: Get dev distal origin of a branch to a branch of the local test

12、

Command: git branch -v

Role: View the last commit each branch

13

Command: git branch --help

Role: View help documentation for git branch

Published 124 original articles · won praise 21 · views 30000 +

Guess you like

Origin blog.csdn.net/tyustli/article/details/103982926