2014-07-21 4 views
0

내 디렉토리에 파일이 있습니다 (myproject.sublime-project). 파일을 제외 파일에 추가하면 해당 파일이 다음과 같이 보입니다..git/info/exclude에 항목을 추가해도 무시하지 않습니다.

# git ls-files --others --exclude-from=.git/info/exclude 
# Lines that start with '#' are comments. 
# For a project mostly in C, the following would be a good set of 
# exclude patterns (uncomment them if you want to use them): 
# *.[oa] 
# *~ 
myproject.sublime-project 

파일은 여전히 ​​무시되지 않습니다. git status을 실행하면 추적 할 수없는 파일로 표시됩니다. 그러나 .gitignore에 추가하면 더 이상 추적되지 않은 것으로 표시되지 않습니다.

.git/info/exclude.gitignore과 똑같이 작동하는 방법이 있습니까? 작동하는 것 같다

+0

그리고 git push를 사용하면 어떻게됩니까? 무시하고 싶은 파일이 무시됩니까? – tcollart

+0

파일이 커밋되거나 색인에 추가되지 않으므로 Git 푸시는 아무 작업도 수행하지 않습니다. – user60561

답변

0

해결 방법 :

.gitignore에 파일을 추가하고 커밋되는 것을 .gitignore에 대한 변경을 방지하기 위해 $ git update-index --assume-unchanged .gitignore를 사용합니다.

관련 문제