2017-09-05 1 views
2

우선의 비 추적 파일을 덮어 뿌려 :힘내 상태 깨끗한 보여 주지만, 체크 아웃은

git status 

결과가 깨끗합니다.

둘째

git checkout fb/booking_interaction 
error: The following untracked working tree files would be overwritten by checkout: 
web/sites/all/modules/contrib/ckeditor/images/buttons/blockQuote.png 

셋째, 비 추적 파일을 삭제하려고합니다. 지정된 디렉토리에서 :

git clean -f . 

다시 변경 및 git checkout이 실패합니다.

무엇이 문제입니까?

+0

.gitignore에서 PNG 파일을 무시합니까? 'mv blockQuote.png/tmp /'또는 숨겨둔 경우 체크 아웃이 성공합니까? –

답변

3

이 문제는 파일 시스템의 대소 문자를 구분하기 때문에 발생합니다.

문제를 살펴 봅니다. 파일 목록 :

> ls 
imageButton.png 
imagebutton.png 

확인 자식이 대소 문자 구분

> vi .git/config 
ignorecase = false 

이 컴퓨터에 설정되어있는 경우를 구분합니다. 변경이 이루어진 기계도 있어야합니다.

> git log 
removeformat.png - renamed from removeFormat.png. 

ignorecase가 변경되었으므로 이제 git status가 변경 사항을 표시합니다.

git clean -f . 
Removing blockQuote.png 
Removing bulletedList.png 

내가 문제없이 다른 분기를 체크 아웃 할 수 있습니다 예상대로

> git status 

Untracked files: 
(use "git add <file>..." to include in what will be committed) 

blockQuote.png 
bulletedList.png 

망할 놈의 청소도 작동합니다.

관련 문제