git의 .gitignore 사용방법

anonymous
2021년 12월 29일

이번에 git 을 루트에 설정해놓고 하위 지정 디렉토리만 제외시키는 방법으로 깃을 사용하려고 하니 좀 어렵더군요.

# Project exclude paths
/_backup/
/common/
/addons/
/classes/
/config/
/files/
/formmail_noajax/
/m.layouts/
/mail/
/mail2/
/mail3/
/mail4/
/mail6/
/misc/
/modules/
/parser
/simplehtmldom/
/smtp
/vendor/
/widgets/
/widgetstyles/
/.idea/
# !addons/
# ignore node dependency directories
/node_modules/
# ignore log files and databases
*.log
*.sql
*.sqlite
*.zip
.htaccess
.editorconfig
adminer.php
codeception.dist.yml
composer.json
composer.lock
CONTRIBUTING.md
COPYRIGHT
dst.php
eond.md
index.php
LICENSE
README.md
SECURITY.md
sub-xe.conf
test.php
test2.php
*.php
# !/layouts/el_imin/
# !modules/board/skins/eb_imin/
# !modules/contents/skins/ec_imin/
# !.gitignore
# !/widgetstyles/simple

!layouts/
layouts/*
!layouts/el_imin

# you can skip this first one if it is not already excluded by prior patterns
!application/

application/*
!application/language/

application/language/*
!application/language/gr/

##

!modules/

modules/*
!modules/board/

modules/board/*
!modules/board/skins/

modules/board/skins/*
!modules/board/skins/eb_imin/


!modules/contents/

modules/contents/*
!modules/contents/skins/

modules/contents/skins/*
!modules/contents/skins/ec_imin/

제가 작성한 .gitignore 파일입니다. 참조해서 작업하세요.


참조

https://pythonq.com/so/git/1248

https://swealth.tistory.com/190

https://medium.com/@yeongpal/git-%EC%97%90-push-%ED%95%A0-%ED%8C%8C%EC%9D%BC-%EC%98%88%EC%99%B8%EC%B2%98%EB%A6%AC%ED%95%98%EA%B8%B0-aec810a319e5


https://velog.io/@psk84/.gitignore-%EC%A0%81%EC%9A%A9%ED%95%98%EA%B8%B0#%EA%B0%84%EB%8B%A8%ED%9E%88-gitignore-%ED%8C%8C%EC%9D%BC-%EC%83%9D%EC%84%B1


 
댓글은 로그인 사용자만 작성 가능합니다. 로그인하기