巴邦';s git和Windows';吉特唐';我们不能一起工作
我的电脑上安装了两个Git巴邦';s git和Windows';吉特唐';我们不能一起工作,git,intellij-idea,cygwin,babun,Git,Intellij Idea,Cygwin,Babun,我的电脑上安装了两个Git 一个是在babun中使用的(基本上是cygwin,有一堆不错的插件),git是通过pact install 一个用于命令提示符,它是Windows的官方git二进制文件 有趣的是,使用babun的git进行的提交并没有反映在git for Windows上。例如,对于同一个git存储库,这是babun的git的结果 git status
pact install
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
这是git for Windows的结果
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")
git状态
关于分支开发
您的分支比“origin/dev”早1个提交。
(使用“git push”发布本地提交)
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git签出--…”放弃工作目录中的更改)
修改:somefile.iml
未向提交添加任何更改(使用“git add”和/或“git commit-a”)
这是什么原因造成的?我需要结果保持一致,因为intellij只能与本机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
这是什么原因造成的
~/apps/med prerate general
不是IntelliJ使用的实际Windows路径(即,您正在为同一远程repo查看两个不同的路径)
或者~/apps/med prerate general
使用了位于其他位置的自己的.git
文件夹(查找git\u DIR
环境变量)。在这种情况下,.git
repo,.iml
不会被跟踪和忽略。(使用git check ignore-v--somefile.iml检查
这是什么原因造成的
~/apps/med prerate general
不是IntelliJ使用的实际Windows路径(即,您正在为同一远程repo查看两个不同的路径)
或者
~/apps/med prerate general
使用了位于其他位置的自己的.git
文件夹(查找git\u DIR
环境变量)。在这种情况下,.git
repo,.iml
不会被跟踪和忽略。(使用git check ignore-v--somefile.iml进行检查)问题在于babun
没有正确处理行结尾。下面这句话解决了我的问题
git config --global core.autocrlf input
问题是
babun
没有正确处理行结尾。下面这句话解决了我的问题
git config --global core.autocrlf input
我认为是同一个存储库。我使用了
git rev parse--show toplevel
进行检查,返回的路径指向同一个目录,尽管它们并不相同(Windows的版本是C:/Users/username/.babun/cygwin/home/username/apps/med-prerate-general
,而babun的版本是/home/username/apps/med-prerate-general
。这可能是原因吗?@Searene如果/home
是C:/Users/username/.babun/cygwin/home/
,那么它应该是相同的本地repo-ind。)我认为它是同一个存储库。我使用了git rev parse--show top level
进行检查,返回的路径指向同一个目录,尽管它们并不相同(Windows的版本是C:/Users/username/.babun/cygwin/home/username/apps/med-prerate-general
,而babun的版本是/home/username/apps/med-prerate-general
。这可能是原因吗?@Searene如果/home
是C:/Users/username/.babun/cygwin/home/
,那么它应该是相同的本地repo-ind。)艾德。