2016-12-22 1 views
-1

"js"폴더의 모든 파일을 추적하지 못합니다..gitignore가 작동하지 않는 상태에서 추적에서 제외됩니다.

# See http://help.github.com/ignore-files/ for more about ignoring files. 

# compiled output 
/dist 
/tmp 


# dependencies 

# IDEs and editors 
/.idea 

# misc 
/.sass-cache 
/connect.lock 
/coverage/* 
/libpeerconnection.log 
npm-debug.log 
testem.log 
/typings 

# e2e 
/e2e/*.js 
/e2e/*.map 

# js 
js/ 


#System Files 
.DS_Store 

node_modules/ 
bower_components/ 
.sass-cache/ 
images/ 
app/test/reportscreenshots/ 
app/test/report/ 

참고 js/가 추적되는 해당 폴더에있는 파일이 제거되지 않습니다 :

여기 내 .gitignore입니다.

enter image description here

왜 내 .gitignore 추적되는 "JS"폴더에 파일을 제외하지 않습니다 여기 내 폴더 구조는?

+1

이전에 저장소에 JS 폴더를 추가 했습니까? 그렇다면 무시하기 전에'git rm --cached'를 사용해야합니다. –

+0

'git rm --cached js/**/*. js'를 시도하십시오. –

답변

0

이전에 폴더가 이미 추적 된 경우 .gitignore에 추가하면 추적 할 수 없습니다.

는 또한

git rm --cached -r mydirectory

--cached 서버에서 gitrepo에서 제거하지만,하지 않습니다 당신의 자식의 repo에서 파일/디렉토리를 제거해야합니다. this StackOverflow question

그런 다음 git status이면 상태에 삭제 된 폴더가 표시됩니다. 삭제를 커밋해야합니다.

관련 문제