如果我在 Linux 系统和 Windows10 笔记本电脑上运行 Git status,它会返回不同的结果。
原始目录是在 Linux 机器(运行 RedHat 6.4)上启动的。我厌倦了使用 VIM 编辑所有 Python 代码,因此决定将 Windows10 笔记本电脑上的网络驱动器映射到远程 Linux 盒子(控制我们所有的测试设备)和使用 Git 设置的目录。现在我可以使用 Visual Studio Code 轻松查看/编辑/更新远程 Linux 计算机上的任何文件。我从 Linux 机器上运行所有 git 命令,但如果我可以直接从 VS Code 运行它们那就太好了,但这两个版本的 Git 之间显然存在差异。
'git status' --> on the Linux box returns no updated or modified files.
'git status' --> on Windows shows I have over 200 modified files and 2 directories that are deleted.
Run Code Online (Sandbox Code Playgroud)
我已经浏览过这个线程: Git - Windows AND linux line-endings
我尝试过那里有很多很棒的信息。唯一似乎有任何效果的事情是添加“git config core.filemode false” …