我的计算机上安装了两个gits,
pact install
安装的有趣的是,用babun的git做出的提交没有反映出Windows的git。例如,对于相同的git存储库,这是babun的git的结果。
git status ~/apps/med-prerate-general
On branch dev
Your branch is ahead of 'origin/dev' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
这是Windows的git的结果
git status
On branch dev
Your branch is ahead of 'origin/dev' by 1 commit.
(use "git push" to publish your local commits)
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: somefile.iml
no changes added to commit (use "git add" and/or "git commit -a")
是什么导致这个?我需要结果保持一致,因为intellij只能使用本机git,它无法看到我用babun的git所做的更改。
答案 0 :(得分:4)
问题是babun
没有正确处理行结尾。以下行解决了我的问题。
git config --global core.autocrlf input
答案 1 :(得分:0)
是什么导致这个?
~/apps/med-prerate-general
不是IntelliJ使用的实际相同的Windows路径(即,您正在查看同一个远程仓库的两个不同路径)
或~/apps/med-prerate-general
使用位于其他位置的自己的.git
文件夹(查找GIT_DIR
环境变量)。在.git
个仓库中,.iml
未被跟踪和忽略。 (查看git check-ignore -v -- somefile.iml
)