首页 文章

Git问题与Vagrant中的共享文件夹有关

提问于
浏览
3

我在使用Vagrant之前从未见过这个问题,所以我希望这对某人有意义 . 我有一个包含git存储库的文件夹,它与运行CentOS 6.5的Vagrant机器同步,并看到与Git的一些不一致 .

在我的主机(Mac OSX)上,如果我运行 git status ,我得到以下内容:

~/Folder/repo$ git status
 On branch master
 Your branch is up-to-date with 'origin/master'.
 nothing to commit, working directory clean

但如果我在我的流浪盒中运行相同的命令,我会得到以下内容:

vagrant@localhost ~/repo$ git status                                                                                                                 master
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   .codeclimate.yml
#   modified:   .gitattributes
#   modified:   .gitignore
#   modified:   CONTRIBUTING.md
#   modified:   app/commands/.gitkeep
#   modified:   app/commands/CreateModule.php
#   modified:   app/commands/FbAdRevenue.php
....

并且列表继续,基本上git本地似乎认为每个文件都已被修改而没有提交,这是不正确的 . 知道为什么会出现这种情况以及如何解决这个问题?

1 回答

相关问题