结帐分支成为结帐文件

时间:2013-11-23 20:05:50

标签: git shell

Shell输出:

Wener@Wener-PC /web/learn/angular/learn/angularjs-book
$ git branch --l
* forAnyOption
  forRawgithub
  master
  myMatser

Wener@Wener-PC /web/learn/angular/learn/angularjs-book
$ git co master
切换到分支 'master'

Wener@Wener-PC /web/learn/angular/learn/angularjs-book
$ git co myMaster
error: pathspec 'myMaster' did not match any file(s) known to git.

Wener@Wener-PC /web/learn/angular/learn/angularjs-book
$ git checkout myMaster
error: pathspec 'myMaster' did not match any file(s) known to git.

$ git --version
git version 1.8.3.4

如何直接更改分支?

2 个答案:

答案 0 :(得分:2)

错误

$ git branch --l * forAnyOption   forRawgithub   主   myMatser

matser!= master

答案 1 :(得分:2)

分支列表中的名称为myMatser,您正在尝试查看myMaster ...

在这种情况下,git checkout myMatser是你想要做的。