.gitignore bestpractice

source

be cautious

  • somefolder/* : somefolder안의 모든 파일을 깃 대상에서 제외
  • !somefolder/.gitkeep : 단 somefolder는 유지
    # exclude everything
    somefolder/*
    

exception to the rule

!somefolder/.gitkeep


#### example

Byte-compiled / optimized / DLL files

pycache/ *.py[cod]

C extensions

*.so

Distribution / packaging

bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

Installer logs

pip-log.txt
pip-delete-this-directory.txt

Unit test / coverage reports

.tox/
.coverage
.cache
nosetests.xml
coverage.xml

Translations

*.mo

Mr Developer

.mr.developer.cfg
.project
.pydevproject

Rope

.ropeproject

Django stuff:

*.log
*.pot

Sphinx documentation

docs/_build/
```

'DevOps > Git' 카테고리의 다른 글

git commit 규약  (0) 2019.09.26
.gitkeep 파일로 empty folder를 git하기  (0) 2019.09.18
git stash커맨드에 대해 알아보자  (0) 2019.08.23
git reflog  (0) 2019.07.24
Rebase하기  (0) 2019.04.03

+ Recent posts