切换分支

1.git checkout <branch-name>

2.git switch <branch-name>

如果是创建并要切换到新分支 可以使用带有 -b 选项的 git checkout 命令,或者使用 git switch -c 命令。

1.git checkout -b <new-branch-name>

2.git switch -c <new-branch-name>

posted @ 2021-09-07 15:58  我和我的小生活  阅读(85)  评论(0编辑  收藏  举报