共计 393 个字符,预计需要花费 1 分钟才能阅读完成。
# 查看远程分支
git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/v0.9rc1
#查看本地分支
git branch
* master
#切换到远程的 v0.9rc1 分支
git checkout -b v0.9rc1 origin/v0.9rc1
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
#已经切换到 v0.9rc1 分支了
$ git branch
master
* v0.9rc1
#切换回 master 分支
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
正文完