.gitignore筆記
可將gitignore設定在以下三個地方,各代表不同意思
- .gitignore
放在跟.git資料夾同一層
設定在這邊的代表此project需要忽略的,且此檔案會commit到git上,所以個人相關的不要放在這(ex: IDE產生的考慮放到下面那兩個)1234567891011121314151617# If you need to exclude files such as those generated by an IDE, use# $GIT_DIR/info/exclude or the core.excludesFile configuration variable as# described in https://git-scm.com/docs/gitignore*.egg-info*.pot*.py[co]__pycache__MANIFESTdist/docs/_build/docs/locale/node_modules/tests/coverage_html/tests/.coveragebuild/tests/report/
$GIT_DIR/info/exclude
$GIT_DIR通常就是.git folder
設定在這邊的代表此project需要忽略的,不會被commit到git,專用來放個人相關的忽略core.excludesFile
全域忽略,所有project相關,在~/.gitconfig有此變數可設定