2016-10-21 6 views
1

, Babun의 자식 및 Windows '자식이 함께 나는 두 GITS 내 컴퓨터에 설치 한

  1. 은 (기본적으로 좋은 애드온의 무리와 Cygwin에서됩니다) babun에 사용되는 작동하지 마십시오 자식입니다 pact install
  2. 하나는 명령 프롬프트에 사용됩니다.이 명령은 Windows의 공식적인 git 바이너리입니다.

흥미로운 점은 babun의 자식으로 만들어진 커밋이 Windows의 자식에 반영되지 않았다는 것입니다. 예를 들어, 동일한 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 

이이 발생할 수 무엇 윈도우

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는 native git에서만 작동 할 수 있기 때문에 일관성있는 결과가 필요합니다. babun의 git으로 변경 한 내용을 볼 수 없었습니다.

답변

0

어떻게 될 수 있습니까?

어느 ~/apps/med-prerate-general

또는 ~/apps/med-prerate-general가 다른 위치에 자신의 .git 폴더를 사용 (같은 원격 REPO에 대한 두 개의 서로 다른 경로를 찾고있다 IE) 인 IntelliJ에 의해 사용되는 실제 동일한 Windows 경로가 아닌 (A 찾아 GIT_DIR 환경 변수). 그리고 .git 리포에서 .iml은 추적되거나 무시되지 않습니다. (git check-ignore -v -- somefile.iml으로 확인하십시오)

+0

나는 그것이 같은 저장소라고 생각한다. 확인하기 위해'git rev-parse --show-toplevel'을 사용했고 반환 된 경로는 같은 디렉토리를 가리켰습니다 (Windows 버전은'C : /Users/username/.babun/cygwin/home입니다./home/username/apps/med-prerate-general'입니다. – Searene

+0

@Searene'/ home'이'C/username/apps/med-prerate-general'이고, :/Users/username/.babun/cygwin/home /'이면 동일한 로컬 저장소 여야합니다. – VonC

1

문제는 babun이 줄 끝을 올바르게 처리하지 못했기 때문입니다. 다음 줄은 내 문제를 해결합니다.

git config --global core.autocrlf input