我对这个问题提出了类似的问题:https://stackoverflow.com/a/2364223/1716560
我有两个分支:uk
和uk-prod
:
git checkout uk-prod
Already on 'uk-prod'
git diff --name-status uk-prod..uk
A pages/Advanced Types.md
A pages/Basic Types.md
A pages/Classes.md
我想只获取文件pages/Advanced Types.md
:
git checkout uk -- "page/Advanced Types.md"
但是git throw:
error: pathspec 'page/Advanced Types.md' did not match any file(s) known to git.
据我了解,这是因为git没有看到本地文件page/Advanced Types.md
。是或否?
答案 0 :(得分:3)
你有一个拼写错误 - page
而不是pages
: - )