Skip to content

GIT 命令备忘录 #8

Description

@liveKang

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 命令清单

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions