git克隆错了-切换分支

//查看分支 只有1个 就是我克隆的
$ git branch
* v3.0.1

//去拉云端的一个分支下来
$ git checkout -b RELEASED_V2_03_20180131  origin/RELEASED_V2_03_20180131
Checking out files: 100% (992/992), done.
Switched to a new branch 'RELEASED_V2_03_20180131'
Branch 'RELEASED_V2_03_20180131' set up to track remote branch 'RELEASED_V2_03_20180131' from 'origin'.

//再次查看
$ git branch
* RELEASED_V2_03_20180131
  v3.0.1

此时本地文件全部都变了 也就是* RELEASED_V2_03_20180131啦!

 

 

发现没有我要的 又回去!

$ git branch
* RELEASED_V2_03_20180131
  v3.0.1



$ git checkout v3.0.1
Checking out files: 100% (992/992), done.
Switched to branch 'v3.0.1'
Your branch is up to date with 'origin/v3.0.1'.

你可能感兴趣的:(git克隆错了-切换分支)