当我使用git checkout master时,工作目录不包含来自主文件头提交的文件。它包含来自远程提交的文件,以及其中一些合并在一起的文件。
这非常奇怪,因为该命令应该使我的工作目录匹配HEAD,但它没有。
有人知道为什么会这样吗?
发布于 2017-03-25 03:46:37
按照git文档的说法,它正在发生:
git checkout <branch>
To prepare for working on <branch>, switch to it by updating the index and the files in the working tree, and by pointing
HEAD at the branch. ** Local modifications to the files in the working tree are kept, so that they can be committed to the
<branch>. **请特别注意**内的代码行。可以通过运行以下命令来验证这一点
签出--help git
https://stackoverflow.com/questions/43007864
复制相似问题