Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIT 命令备忘录 #8

Open
liveKang opened this issue Aug 10, 2018 · 0 comments
Open

GIT 命令备忘录 #8

liveKang opened this issue Aug 10, 2018 · 0 comments

Comments

@liveKang
Copy link
Owner

GIT 命令备忘录

列出所有本地分支 git branch

列出所有本地分支和远程分支 git branch -a

列出所有远程分支 git branch -r

新建分支 git branch [branch-name]

新建一个分支,并切换到该分支 git checkout -b [branch]

合并指定分支到当前分支 git merge [branch]

删除分支 git branch -d [branch-name]

删除远程分支 git push origin --delete [branch-name] git branch -dr [remote/branch]

清理远程已删除本地还存在的分支 git remote prune origin git fetch --prune origin git fetch -p git pull -p

常用 Git 命令清单

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant