ํ’€์Šคํƒ ์›น๐ŸŒ ๊ฐœ๋ฐœ์ž ์ง€๋ง์ƒ ๐Ÿง‘๐Ÿฝโ€๐Ÿ’ป
โž• ์ธ๊ณต์ง€๋Šฅ ๊ด€์‹ฌ ๐Ÿค–


Categories


Recent views

  • 1
  • 2
  • 3
  • 4
  • 5

gitignore ์ž‘์„ฑ๋ฒ•

.gitignore ์ž‘์„ฑ๋ฒ•

์˜๋„์ ์œผ๋กœ Commit ๋˜์ง€ ์•Š๋„๋ก ๋ฌด์‹œ๋˜์–ด์•ผํ•  ํŒŒ์ผ์„ ์ •ํ•ด์ฃผ๋Š” ๊ฒƒ -(https://git-scm.com/docs/gitignore)

git ํด๋”(git init์„ ํ†ตํ•ด .git ์ˆจ๊น€ ํด๋”๊ฐ€ ์ƒ์„ฑ๋œ ๋””๋ ‰ํ† ๋ฆฌ) ๋‚ด๋ถ€์— โ€œ.gitignoreโ€๋ผ๋Š” ์ด๋ฆ„์˜ ํŒŒ์ผ์„ ์ƒ์„ฑํ•œ ๋’ค, ๋ณด์•ˆ์ƒ, ํ”„๋กœ์ ํŠธ ๊ด€๋ จ์ƒ, ํŒŒ์ผ ํฌ๊ธฐ์ƒ ์›๊ฒฉ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ์˜ฌ๋ฆฌ๊ณ  ์‹ถ์ง€ ์•Š์€ ํŒŒ์ผ์ด๋‚˜ ํด๋”๋ฅผ add ๋Œ€์ƒ์—์„œ ์ œ์™ธํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

gitignore.io(https://www.toptal.com/developers/gitignore)๋ฅผ ํ†ตํ•ด ์†์‰ฝ๊ฒŒ ์ž์‹ ์˜ ๊ธฐ์ˆ  ์Šคํƒ์— ๊ด€๋ จ๋œ gitignore ํŒŒ์ผ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์ง€๋งŒ, ๊ฐœ์ธ์ด ์ƒ์„ฑํ•œ ๋ฏผ๊ฐํ•œ ํŒŒ์ผ์„ ์ œ์™ธํ•˜๊ธฐ ์œ„ํ•ด ์ •ํ™•ํ•œ ์‚ฌ์šฉ๋ฒ•๋ฅผ ์•Œ์•„์•ผํ•  ํ•„์š”๊ฐ€ ์žˆ๋‹ค.

์ž์„ธํ•œ ๋‚ด์šฉ์€

๐Ÿ“– https://git-scm.com/docs/gitignore

์ฃผ์˜ํ•  ์ ์€ ์ด๋ฏธ ์›๊ฒฉ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ์˜ฌ๋ผ๊ฐ„ ํŒŒ์ผ์€ ๋’ค๋Šฆ๊ฒŒ gitignore์— ํŒจํ„ด์„ ์ถ”๊ฐ€ํ•œ๋‹คํ•ด๋„ ์˜ํ–ฅ์„ ๋ฐ›์ง€ ์•Š์œผ๋ฉฐ, ์ด๋ฅผ ์œ„ํ•ด ๋”ฐ๋กœ ์ฒ˜๋ฆฌํ•ด์ค˜์•ผํ•œ๋‹ค. โ€œ์›ํ•˜์ง€ ์•Š์€ Git ํŒŒ์ผ ๊ธฐ๋ก ์ง€์šฐ๊ธฐโ€ ์ฐธ์กฐ ๋ฐ”๋žŒ

gitignore

gitignore ํŒŒ์ผ ์˜ˆ์‹œ

์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ .gitignore ํŒŒ์ผ ๋‚ด๋ถ€์— ํŒŒ์ผ๋ช…์— ๋Œ€ํ•œ ํŒจํ„ด์„ ๊ธฐ์žฌํ•˜์—ฌ ํŒŒ์ผ์ด ๊ธฐ๋ก๋˜์ง€ ์•Š๋„๋ก ํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋•Œ, ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค.


...
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,windows,python,react
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,windows,python,react
### react ###
.DS_*
logs
**/*.backup.*
**/*.back.*

node_modules
bower_components

*.sublime*

psd
thumb
sketch

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/
...

gitignore ํŒŒ์ผ์˜ ๋‹ค๋ฅธ ํ™œ์šฉ ๋ฐฉ๋ฒ•๋“ค

Git์€ ์—ฌ๋Ÿฟ์˜ gitignore ํŒŒ์ผ๊ณผ ํŒŒ์ผ ๋‚ด๋ถ€ ๋ผ์ธ์„ ์ฝ๊ณ  ๋ฌด์‹œํ•  ํŒŒ์ผ์„ ์ธ์ง€ํ•˜๋Š”๋ฐ, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ณต์žกํ•œ ์šฐ์„ ์ˆœ์œ„์™€ ๊ฐ€๋…์„ฑ์„ ์œ„ํ•ด ๋ณดํ†ต ํ•˜๋‚˜์˜ .gitignore ํŒŒ์ผ์„ ํ”„๋กœ์ ํŠธ ์ตœ์ƒ๋‹จ ํด๋”์— ์œ ์ง€ํ•œ๋‹ค.

  • gitignore ํŒŒ์ผ์ด ์—ฌ๋Ÿฌ ํด๋”์— ์กด์žฌํ•  ๊ฒฝ์šฐ, ํ˜„์žฌ ํด๋”์˜ gitignoreํŒŒ์ผ์„ ์ตœ์šฐ์„ ์œผ๋กœ, ์ƒ์œ„ ํด๋”์ผ ์ˆ˜๋ก ๋‚ฎ์€ ์šฐ์„ ์ˆœ์œ„๋กœ gitignore ํŒŒ์ผ ์„ค์ •์„ ๋ฎ์–ด์”Œ์šด๋‹ค.
  • ์ด์™ธ์—๋„ .git ํด๋” ๋‚ด๋ถ€์—๋„ git์— ์˜ํ•ด ์ƒ์„ฑ๋˜๋Š” ํŒŒ์ผ๋“ค์„ ๋ฌด์‹œํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ๋ณธ ์ƒ์„ฑ gitignore๊ฐ€ ์กด์žฌํ•จ

์ด๋Ÿฌํ•œ .gitignore ํŒŒ์ผ์€ push ์‹œ์— ์›๊ฒฉ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ๊ฐ™์ด ์˜ฌ๋ผ๊ฐ€๋ฏ€๋กœ, ๋งŒ์•ฝ ๋งŽ์€ ์‚ฌ๋žŒ์ด ์ฐธ์—ฌํ•˜๊ณ  ์žˆ๋Š” ํ”„๋กœ์ ํŠธ ์ค‘์—, ๋‚˜์˜ ๋กœ์ปฌ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์—์„œ๋งŒ ์ œ์™ธํ•˜๊ณ  ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์€ ์ œ์™ธํ•  ํ•„์š” ์—†๋Š” ํŒŒ์ผ์˜ ๊ฒฝ์šฐ๋Š” $GIT_DIR/info/exclude ํŒŒ์ผ์— ๊ธฐ์žฌํ•˜๋ฉด ๋œ๋‹ค.

ํ”„๋กœ์ ํŠธ๋‚˜, ๋ ˆํฌ์ง€ํ† ๋ฆฌ์™€ ๊ด€๊ณ„์—†์ด GIT์„ ์‚ฌ์šฉํ•˜๋Š” ์–ด๋– ํ•œ ์ƒํ™ฉ์—์„œ๋“  ๋ฌด์กฐ๊ฑด ์ œ์™ธํ•˜๊ณ  ์‹ถ์€ ๋‚˜์˜ ํŒŒ์ผ์˜ ํŒจํ„ด(์ „์—ญ ๋ฌด์‹œ, Global ignore)์€ $XDG_CONFIG_HOME/git/ignore ๋˜๋Š” $HOME/.config/git/ignore ํŒŒ์ผ์— ๊ธฐ์žฌํ•˜๋ฉด ๋œ๋‹ค.

  • ignore ํŒŒ์ผ์˜ ๊ฒฝ๋กœ๋‚˜ ์ด๋ฆ„์„ ๋ฐ”๊พธ๊ณ  ์‹ถ์œผ๋ฉด git config โ€“global core.excludesfile ~/{์›ํ•˜๋Š” ๊ฒฝ๋กœ}, ๋˜๋Š” ์ง์ ‘ ๊ฒฝ๋กœ ~/.gitconfig/core.excludesFile์— ๋“ค์–ด๊ฐ€์„œ ๊ฒฝ๋กœ๋ฅผ ๋ฐ”๊ฟ”์ค„ ์ˆ˜ ์žˆ๋‹ค.

git check-ignore [ํŒŒ์ผ, ํด๋”๋ช…]์„ ํ†ตํ•ด ํ•ด๋‹น ํŒŒ์ผ, ํด๋”๊ฐ€ ์ œ์™ธ๋˜์–ด์žˆ๋Š” ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ๋งŒ์•ฝ ๋Œ€์ƒ์ด ์ œ์™ธ๋˜์–ด์žˆ๋‹ค๋ฉด ํ•ด๋‹น ํด๋”๋ช…์ด ๋‚˜ํƒ€๋‚œ๋‹ค.
  • ๋Œ€์ƒ์ด ํฌํ•จ๋˜์–ด ์žˆ๋‹ค๋ฉด ์•„๋ฌด๊ฒƒ๋„ ๊ฒฐ๊ณผ์ฐฝ์— ๋‚˜ํƒ€๋‚˜์ง€ ์•Š๋Š”๋‹ค.

ํŒจํ„ด ํฌ๋งท๊ณผ ์˜ˆ์‹œ

git์ด ์ด์šฉํ•˜๋Š” ํŒจํ„ด์€ glob ํŒจํ„ด์—์„œ brace expression์„ ์ œ์™ธํ•œ ๊ฒƒ๊ณผ, ์ •๊ทœํ‘œํ˜„์‹์˜ [a..z] expression์„ ์ถ”๊ฐ€ํ•œ ๊ฒƒ์„ ํ•ฉ์นœ ๋ฌธ๋ฒ•์ด๋ฉฐ, ์—ฌ๊ธฐ์„œ๋Š” ํŒจํ„ด์— ๋”ฐ๋ฅธ git์˜ .gitignore ํŒŒ์ผ ์˜ˆ์‹œ๋ฅผ ์ค‘์‹ฌ์œผ๋กœ ์ด์•ผ๊ธฐํ•  ๊ฒƒ์ด๋‹ค.

์—ฌ๊ธฐ์„œ โ€œ์ œ์™ธโ€๋Š” ์›๊ฒฉ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ์˜ฌ๋ผ๊ฐ€์ง€ ์•Š์Œ์„ ์˜๋ฏธํ•˜๋ฉฐ, โ€œํฌํ•จโ€์€ ์˜ฌ๋ผ๊ฐ์„ ์˜๋ฏธํ•œ๋‹ค.

  • ์˜ˆ๋ฅผ ๋“ค์–ด โ€œํŒŒ์ผ a๋Š” ์ œ์™ธ๋˜๋ฉฐ, ํŒŒ์ผ b๋„ ํฌํ•จ์ด๋‹คโ€ ๊ฐ™์ด, b๊ฐ€ git์— ์˜ํ•ด commit ๋œ๋‹ค๋Š” ์˜๋ฏธ์ธ์ง€, ์•„๋‹ˆ๋ฉด a์ฒ˜๋Ÿผ ์ œ์™ธ๋œ๋‹ค๋Š” ์˜๋ฏธ์ธ์ง€ ํ—ท๊ฐˆ๋ฆฌ๋Š” ํ‘œํ˜„์€ ์ตœ๋Œ€ํ•œ ์ž์ œํ–ˆ์œผ๋ฉฐ, ๋งŒ์•ฝ ์กด์žฌํ•œ๋‹ค๋ฉด, ์ด๋•Œ b๋Š” a์™€ ๋‹ฌ๋ฆฌ ์ œ์™ธ๋˜์ง€ ์•Š๊ณ  ์˜ฌ๋ผ๊ฐ„๋‹ค๋Š” ์˜๋ฏธ์ด๋‹ค.
# using # to comment. if you need to use # using \# instead.

# using blank line as a separator

๋นˆ ๊ณต๊ฐ„์€ ๊ตฌ๋ถ„์ž๋กœ ์‚ฌ์šฉ๋˜๋ฉฐ, #์œผ๋กœ ์ฃผ์„์„ ๋‚จ๊ธธ ์ˆ˜ ์žˆ๋‹ค.

mustinclude.txt
# mustinclude.txt ์ œ์™ธ ํŒจํ„ด

!mustinclude.txt
# ์ƒ์œ„์˜ ์ œ์™ธ ํŒจํ„ด์„ ๋ฌด์‹œํ•˜๊ณ  ๋ฌด์กฐ๊ฑด ํฌํ•จ์‹œํ‚ด

!/mustIncludeFolder/
# mustIncludeFolder๋ฅผ ๋ฌด์กฐ๊ฑด ํฌํ•จ์‹œํ‚ด

\!important!.txt
# ํŒŒ์ผ๋ช… ์ค‘๊ฐ„์— ์œ„์น˜ํ•œ !๋Š” \๋ฅผ ์ ‘๋‘์‚ฌ๋กœ ๋„ฃ์„ ํ•„์š”์—†๋‹ค.

/specificDir/

โ€\โ€œ๊ฐ€ ์•ž์— ์žˆ์ง€ ์•Š์€ ๊ณต๋ฐฑ ๋ฌธ์ž๋Š” ๋ฌด์‹œ๋œ๋‹ค.

โ€!โ€œ๊ฐ€ ์ ‘๋‘์–ด๋กœ ์žˆ๋Š” ํŒจํ„ด์€ ์ด์ „์— ์ œ์™ธ ํŒจํ„ด์ด ์กด์žฌํ•ด๋„ ๋ฐ˜๋“œ์‹œ ํฌํ•จ๋œ๋‹ค. ํ•˜์ง€๋งŒ, ํ•ด๋‹น ํŒŒ์ผ์˜ ์ƒ์œ„ ๊ฒฝ๋กœ๊ฐ€ ํ†ต์งธ๋กœ ์ œ์™ธ๋œ ๊ฒฝ์šฐ๋‚˜, ๋˜ ๋‹ค์‹œ ์•„๋ž˜์— ๋‹ค์‹œ ์ œ์™ธ๋œ ๊ฒฝ์šฐ์—๋Š” ๋‹ค์‹œ ํฌํ•จ๋  ์ˆ˜ ์—†๋‹ค.

โ€!โ€œ๋ฅผ ํŒŒ์ผ๋ช…์˜ ์ตœ์„ ๋‘ ๋“ฑ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์„ ๋•Œ๋Š” โ€œ\!โ€œ๋ฅผ ์ด์šฉํ•˜์ž.

/FolderInSameDir/ChildDir/excludedfile.txt 
# .gitignore ํŒŒ์ผ๊ณผ ๊ฐ™์€ ํด๋”์— ์œ„์น˜ํ•œ FolderInSameDir ํด๋” ๋‚ด์˜ ChildDir ํด๋” ๋‚ด์˜ excludedfile.txt ์ œ์™ธ
# ๋‹ค๋ฅธ ํด๋” ๋‚ด๋ถ€์— ์žˆ๋Š” otherFolder/FolderInSameDir/ChildDir/excludedfile.txt์€ ๊ทธ๋Œ€๋กœ ํฌํ•จ๋จ

FolderInSameDir/ChildDir/excludedfile2.txt 
# ์œ„์™€ ๊ฐ™์€ ๊ฒฝ๋กœ์˜ excludedfile2.txt ์ œ์™ธ, ์ฆ‰ ๋งจ ์•ž์˜ "/"์€ ์—†์–ด๋„ ๋จ

/fileInHere.txt
# .gitignore ํŒŒ์ผ๊ณผ ๊ฐ™์€ ํด๋”์— ์กด์žฌํ•˜๋Š” fileInHere.txt ์ œ์™ธ
# ๋‹ค๋ฅธ ํด๋” ๋‚ด๋ถ€์— ์žˆ๋Š” /otherFolder/fileInHere.txt์€ ๊ทธ๋Œ€๋กœ ํฌํ•จ๋จ

"/"๋ฅผ ํŒŒ์ผ ๊ฒฝ๋กœ ๊ตฌ๋ถ„์ž๋กœ ์‚ฌ์šฉํ•˜๋ฉฐ, ํŒจํ„ด์˜ ์ฒ˜์Œ์ด๋‚˜ ์ค‘๊ฐ„์— ์กด์žฌํ•  ์‹œ์—๋Š”, .gitignore ํŒŒ์ผ์—์„œ์˜ ์ƒ๋Œ€์  ํŒŒ์ผ ๊ฒฝ๋กœ์— ์กด์žฌํ•˜๋Š” ํŒŒ์ผ์„ ์˜๋ฏธํ•˜๋ฉฐ, ์กด์žฌํ•˜์ง€ ์•Š์„ ์‹œ์—๋Š” .gitignore ํŒŒ์ผ๊ณผ ๊ฐ™์€ ํด๋” ๋‚ด์˜ ํŒŒ์ผ์„ ์ œ์™ธ์‹œํ‚จ๋‹ค.

folderOrFile
# folderOrFile์ด๋ผ๋Š” ์ด๋ฆ„์˜ ํด๋”๋งŒ ์ „๋ถ€ ์ œ์™ธ

onlyTxt.txt
# onlyTxt.txt์ด๋ผ๋Š” ์ด๋ฆ„์˜ ํŒŒ์ผ๋งŒ ์ „๋ถ€ ์ œ์™ธ, onlyTxt.exe, onlyTxt.md ๋“ฑ, ๋‹ค๋ฅธ ํ™•์žฅ์ž๋Š” ๊ทธ๋Œ€๋กœ ํฌํ•จ๋จ.

onlyFolder/
# onlyFolder๋ผ๋Š” ์ด๋ฆ„์˜ ํด๋”๋งŒ ์ œ์™ธ

onlyFile.*
# ์•„๋ž˜์—์„œ ๋ฐฐ์šธ *๋ฅผ ์ด์šฉํ•œ onlyFile์ด๋ผ๋Š” ์ด๋ฆ„์„ ๊ฐ€์ง„ ํŒŒ์ผ๋งŒ ์ „๋ถ€ ์ œ์™ธ ํ•˜๋Š” ๋ฐฉ๋ฒ•

# ํŒŒ์ผ, ํด๋”๋ช…๋งŒ ๋ฉ๊ทธ๋Ÿฌ๋‹ˆ ์žˆ๋Š” ๊ฒฝ์šฐ๋“ค์ด๋ฉฐ, git์ด ๊ด€๋ฆฌํ•˜๋Š” ๋ชจ๋“  ๊ฒฝ๋กœ์— ์กด์žฌํ•˜๋Š” folderfolderOrFile, onlyFolder ํด๋”์™€ onlyFile.txt, folderOrFile ํŒŒ์ผ๋“ค์€ ์ „๋ถ€ ์ œ์™ธ๋œ๋‹ค.
# ์˜ˆ๋ฅผ ๋“ค์–ด otherFolder/folderfolderOrFile/, otherFolder/anotherFolder/onlyFile.txt ๋“ฑ ๋˜ํ•œ ์ œ์™ธ๋œ๋‹ค.

"/"์ด ๋งจ ๋งˆ์ง€๋ง‰์— ์กด์žฌํ•  ๊ฒฝ์šฐ๋‚˜ ์กด์žฌํ•˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ๋ชจ๋‘, ํ•ด๋‹น ์ด๋ฆ„์˜ ํด๋”๋ฅผ ์ œ์™ธํ•˜๋ฉฐ, ํŒŒ์ผ์„ ์ œ์™ธํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์•„๋ž˜์— ๋ฐฐ์šธ "*"(๋ณ„ํ‘œ, asterisk)๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

์•ž์— ์ถ”๊ฐ€ ํด๋” ๊ฒฝ๋กœ๊ฐ€ ์ œ์‹œ๋˜์ง€ ์•Š๊ณ , ์ด๋ฆ„๋งŒ ๋ฉ๊ทธ๋Ÿฌ๋‹ˆ ์žˆ๋Š” ๊ฒฝ์šฐ์—๋Š” ๋ชจ๋“  ๊ฒฝ๋กœ์˜ ํด๋”๋‚˜ ํŒŒ์ผ์ด ์ œ์™ธ ๋Œ€์ƒ์ด๋‹ค.

*.html
# ๋ชจ๋“  html ํ™•์žฅ์ž ํŒŒ์ผ์„ ์ œ์™ธ์‹œํ‚ด

noInclude.*
# noInclude๋ผ๋Š” ์ด๋ฆ„์˜ ํŒŒ์ผ์„ ํ™•์žฅ์ž ๊ด€๊ณ„์—†์ด ๋ชจ๋‘ ์ œ์™ธ์‹œํ‚ด

exclude-[0-9]/
# exclude-0 ๋ถ€ํ„ฐ exclude-9๊นŒ์ง€์˜ ํด๋”๋ฅผ ์ „๋ถ€ ์ œ์™ธ์‹œํ‚ด

credential??
# ์ ‘๋‘์–ด credential๋กœ ์‹œ์ž‘ํ•˜๊ณ  ๋’ค์— ์ž„์˜ ๋‘ ๊ธ€์ž๊ฐ€ ์ถ”๊ฐ€๋œ ํŒŒ์ผ๊ณผ ํด๋”๋ฅผ ์ „๋ถ€ ์ œ์™ธ์‹œํ‚ด

no*.js
# ์ ‘๋‘์–ด no๋กœ ์‹œ์ž‘ํ•˜๋Š” ๋ชจ๋“  ๊ธธ์ด์˜ ํŒŒ์ผ๋ช…์„ ๊ฐ€์ง„ js ํ™•์žฅ์ž ํŒŒ์ผ์„ ์ œ์™ธ์‹œํ‚ด

"*"์€ "/"์„ ์ œ์™ธํ•œ ๋ชจ๋“  ๋ฌธ์ž์—ด์„, "?"์€ "/"์„ ์ œ์™ธํ•œ ๋ชจ๋“  ๋ฌธ์ž ํ•˜๋‚˜๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, "[a-zA-Z]"๋Š” ํ•ด๋‹น ๋ฒ”์œ„ ๋‚ด์˜ ๋ฌธ์ž ํ•˜๋‚˜๋ฅผ ์˜๋ฏธํ•œ๋‹ค.

์• ์ดˆ์— ํŒŒ์ผ ๋ฐ ํด๋”๋ช…์— ํฌํ•จ์‹œํ‚ค๋Š” ๊ฑด ๋ถˆ๊ฐ€๋Šฅํ•˜๊ธด ํ•˜์ง€๋งŒ "\?", "\*"๋ฅผ ์ด์šฉํ•ด ํŒจํ„ด์ด ์•„๋‹Œ ๋ฌธ์ž ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

**/allExclude
# allExclude๋ž€ ์ด๋ฆ„์˜ ๋ชจ๋“  ํŒŒ์ผ๊ณผ ํด๋”๋ฅผ ๊ฒฝ๋กœ์™€ ๊ด€๊ณ„์—†์ด ์ œ์™ธ์‹œํ‚จ๋‹ค.

allExclude
# ์ด์ „์— ๋ฐฐ์› ๋˜ ๋ฐฉ๋ฒ•, **๋ฅผ ์‚ฌ์šฉํ•œ ๋ฐ”๋กœ ์œ„์™€ ๊ฐ™์€ ๋™์ž‘์ด์ง€๋งŒ, ๊ฐ€๋…์„ฑ์ ์œผ๋กœ **๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ๋” ์ข‹์œผ๋ฉฐ, ์•„๋ž˜์™€ ๊ฐ™์€ ๋™์ž‘์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

**/otherFolder/*.html
# ์–ด๋– ํ•œ ๊ฒฝ๋กœ์—์„œ๋“  otherFolder๋ผ๋Š” ํด๋” ๋‚ด๋ถ€์˜ ๋ชจ๋“  html ํŒŒ์ผ์„ ์ œ์™ธํ•จ, **๋ฅผ ์‚ฌ์šฉํ•ด์•ผ๋งŒ ์“ธ ์ˆ˜ ์žˆ๋Š” ํ‘œํ˜„

rootFolder/**/anyFile.*
# rootFolder๋‚ด์˜ anyFile์ด๋ผ๋Š” ์ด๋ฆ„์˜ ํŒŒ์ผ์„ ์ถ”๊ฐ€์ ์ธ ๊ฒฝ๋กœ์™€ ๊ด€๊ณ„์—†์ด ๋ชจ๋‘ ์ œ์™ธํ•œ๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ **๋ฅผ ์‚ฌ์šฉํ•ด์•ผ๋งŒ ์“ธ ์ˆ˜ ์žˆ๋Š” ํ‘œํ˜„
# rootFolder/extra/anyFile.txt๋‚˜, rootFolder/moreFolder/anyFile.js, rootFolder/long/longFolders/anyFile.md ๋ชจ๋‘ ์ œ์™ธ๋œ๋‹ค.

๋‘๊ฐœ์˜ ๋ณ„ํ‘œ(asterisk) โ€œ**โ€œ๋ฅผ ์ด์šฉํ•ด ๊ฒฝ๋กœ์™€ ๊ด€๊ณ„์—†์ด ๋ชจ๋“  ํŒŒ์ผ ๋ฐ ํด๋”๋ฅผ ์ œ์™ธ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.

๋‘๊ฐœ ์ด์ƒ์˜ ๋ณ„ํ‘œ, ์˜ˆ๋ฅผ ๋“ค์–ด โ€œ***โ€ ๋ถ€ํ„ฐ๋Š” ๊ฐ์ž 1๊ฐœ์˜ ๋ณ„ํ‘œ์™€ ๊ฐ™์ด ์ž‘๋™ํ•œ๋‹ค. ์ฆ‰ โ€œ*โ€œ์™€ ๋ณ„ ์ฐจ์ด๊ฐ€ ์—†์„ ๊ฒƒ์ด๋‹ค.