Git pull 结果为 "needs update",文件显示为已修改

标签 git git-pull

在 pull (到一个干净的生产类型的 repo 中)所有变更集遇到并导致文件看起来已修改并需要提交。 git 日志没有显示应该导致这些更改的提交...这些更改只是在没有日志注释的情况下提取,因此它认为它不同步。

pull 结果显示每个文件的“需要更新”消息。

最佳答案

如图所示 Git project ,当 Git 尝试为在 Unix 上开发并在 Windows 上克隆的项目调整 eol 样式时,可能会发生这种情况:

via msysgit Troubleshooting

run command in git bash: git config --global core.autocrlf false if this is not done then git svn rebase reports "needs update" thinking that changes have been made to the source May run into troubles with the commit

查看此 SO answer for more .

关于Git pull 结果为 "needs update",文件显示为已修改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6262986/

相关文章:

java - 访问heroku服务器上的文件或文件夹

git - 从 Git 中提取失败并给我以下错误 : client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

git - 如何 pull SourceTree 中的所有分支?

git - 仅解决某些文件的 merge 冲突并提交其他团队的分支以解决他们的冲突

git pull origin master 不更新 origin/master?

git - 是否有一个脚本可以修复 git-diff --check 警告?

linux - 尝试在 CentOS 7 上的 Apache 上安装 GitLab

javascript - 赫斯基 5 .huskey gitignore

git - 了解并尝试为 fuse 文件系统应用 git 补丁

git - ! [rejected] master -> master (non-fast-forward) 在一个新的最新分支上