-1
我試圖刪除「js」文件夾中的所有文件被跟蹤。從跟蹤排除與.gitignore不工作
這裏是我的.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沒有被跟蹤排除「JS」文件夾中的文件?
您以前是否將該JS文件夾添加到您的存儲庫?如果是這樣,那麼你需要使用'git rm --cached',然後才能忽略它。 –
試試'git rm --cached js/**/*。js' –