2016-07-31 1 views
1

에 추가되지 않음 : 그 구성 요소를 설치 한 후이 문제 될 수 있도록 Gitignore 예외 내가 내 .gitignore에 다음 한 추적

*.log 
/bower_components/* 
/node_modules 
!/bower_components/v-accordion 
!/node_modules/todomvc-app-css/* 

나는 마지막 두 줄을 추가,하지만 난 말할 수 없다.

어느 쪽이든, 적극적으로 사용자 지정하고 프로덕션으로 이동하면서 이러한 디렉터리의 변경 내용을 추적하고 싶습니다.

그러나 나는 그들을 추적 할 힘내를 얻는 것처럼 보일 수 없다.
내가 뭘 잘못하고 어떻게 해결할 수 있습니까?

편집 : .gitignore의

최신 버전 : 그러나

*.log 

/bower_components/** 
!/bower_components/v-accordion/ 
!/bower_components/v-accordion/** 

/bower_components/angular-bootstrap-calendar/ 
!/bower_components/angular-bootstrap-calendar/ 
!/bower_components/angular-bootstrap-calendar/** 

/node_modules/ 
/node_modules/** 
!/node_modules/todomvc-app-css/ 
!/node_modules/todomvc-app-css/** 

답변

2

, 나는 간단하게 확인 힘내 그들에게

을 추적하는 얻을 수없는 것 :

git check-ignore -v -- node_modules/todomvc-app-css/afile 

그러면 해당 파일을 추적 할 수 없게하는 .gitignore의 규칙을 확인할 수 있습니다.

규칙은 간단하다 :

It is not possible to re-include a file if a parent directory of that file is excluded.

은 먼저 내용을 제외하기 전에 폴더를 제외해야합니다

*.log 

/bower_components/** 
!/bower_components/v-accordion/**/ 
!/bower_components/v-accordion/** 

/node_modules/** 
/node_modules/todomvc-app-css/**/ 
!/node_modules/todomvc-app-css/** 
+0

내가 먼저는 .gitignore 파일을 편집 당신이 제안한 명령을 실행. 그러나 파일을 변경하고'git status'를 실행해도 변경 사항이 등록되지 않습니다. 어떤 생각이 일어나고 있습니까? – MadPhysicist

+0

@MadPhysicist'git check-ignore -v -node_modules/todomvc-app-css/afile' (''afile' '을 적절히 대체하십시오)은 무엇을 반환합니까? – VonC

+0

다음과 같이하십시오 :'.gitignore : 9 :!/bower_components/angular-bootstrap-calendar/** \t bower_components/angular-bootstrap-calendar/dist/css/angular-bootstrap-calendar.css' 참고로, 다른 파일을 원래 질문과 비교합니다. 내가 편집 한. gitingore로 편집 한 질문에 대한 나의 편집. – MadPhysicist