git 回购同步错误:.repo/manifests/:包含未提交的更改
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33690237/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
repo sync error: .repo/manifests/: contains uncommitted changes
提问by xuehui
After issued repo sync, I got a error message like error: .repo/manifests/: contains uncommitted changes, but git statusor git diffshowed nothing changed.
发布后repo sync,我收到一条错误消息,如error: .repo/manifests/: contains uncommitted changes,但git status或git diff显示没有任何变化。
What's cause of the problem and why it happened?
问题的原因是什么,为什么会发生?
采纳答案by xuehui
Find the root cause, all files under .repo/manifests were changed with their filemode, "git config core.filemode false" can fix this "Modify".
找到根本原因,.repo/manifests 下的所有文件都被改变了它们的文件模式,“git config core.filemode false”可以修复这个“修改”。
回答by ashwini sawanth
- Go to ./repo/manifests
- $ git reset --hard
- $ repo sync
- 转到 ./repo/manifests
- $ git reset --hard
- $ 回购同步
回答by Jmons
You can use the command repo diffor repo statusto find which of the child git repositories it is which is broken. It might not be the sub-repository you think it is.
您可以使用该命令repo diff或repo status查找损坏的子 git 存储库。它可能不是您认为的子存储库。
回答by Nir Duan
Commit your changes under .repo/manifests/by doing the following commands from the project root's folder:
.repo/manifests/通过从项目根目录的文件夹中执行以下命令来提交您的更改:
cd .repo/manifests/
git commit -a -m "Very Informative Title"
回答by mrutyunjay
make sure you don't have another .repo directory in parent directory.
确保父目录中没有另一个 .repo 目录。

