我在这里遇到了一件有趣的事情。我已经开发了一段时间(在 Windows 上开发,文件移动到 Linux VM,从 VM 进行提交)并创建了许多新文件。当我运行 a时,它会在部分和部分git status
中显示我的所有新文件。new file:
modified:
这是结果git status
:
# On branch 2.x-merge
# Your branch is ahead of 'composer/2.x-merge' by 1 commit.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: SP/ElasticSearch/ElasticSearch.php
# new file: SP/ElasticSearch/Filters/AndFilter.php
# new file: SP/ElasticSearch/Filters/Boolean.php
# new file: SP/ElasticSearch/Filters/OrFilter.php
# new file: SP/ElasticSearch/Queries/Boolean.php
# new file: SP/ElasticSearch/Queries/Filtered.php
# new file: SP/ElasticSearch/Queries/Match.php
# new file: SP/ElasticSearch/Queries/MatchAll.php
# new file: SP/ElasticSearch/Queries/Term.php
# new file: SP/ElasticSearch/esFilter.php
# new file: SP/ElasticSearch/esInserter.php
# new file: SP/ElasticSearch/esQuery.php
# new file: SP/ElasticSearch/esQueryBuilder.php
# new file: tests/SP/ElasticSearch/ESTest.php
# new file: tests/SP/ElasticSearch/esFilterTest.php
# new file: tests/SP/ElasticSearch/esQueryTest.php
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: SP/ElasticSearch/ElasticSearch.php
# modified: SP/ElasticSearch/Filters/Boolean.php
# modified: SP/ElasticSearch/Filters/OrFilter.php
# modified: SP/ElasticSearch/Queries/Boolean.php
# modified: SP/ElasticSearch/esFilter.php
# modified: SP/ElasticSearch/esQuery.php
# modified: SP/ElasticSearch/esQueryBuilder.php
# modified: build.xml
# modified: tests/SP/ElasticSearch/ESTest.php
# modified: tests/SP/ElasticSearch/esQueryTest.php
#
如果您注意到,修改部分中出现的所有内容(除了build.xml
)都会出现在新部分中,并且这些都是新文件,因此它们应该是。
提交很顺利,我只是做了一个-am
并且没有任何问题,我只是想知道是否有人知道为什么会发生这种情况,这意味着什么,或者它是如何发生的。
提前致谢。