[Git] git ignore
https://shlee0882.tistory.com/230
Nodejs κΈ°λ³Έ μ€μ (NPM Express .gitignore μ€μΉ)
1. node js μλ°μ€ν¬λ¦½νΈλ μΉλΈλΌμ°μ νλ‘ νΈμμ κΌ νμν μΈμ΄μκ³ , μΉλΈλΌμ°μ μ μ’ μμ μ΄μλ€.μΉμ μ’ μμ μ΄μλ μλ°μ€ν¬λ¦½νΈλ₯Ό λΆλ¦¬νμ¬ μ€νκ°λ₯νκ² ν κ²μ΄ nodejsμ΄λ€.nodejsλ js runner
shlee0882.tistory.com
μ€μ νμΌ(.gitignore) μμ±
.gitignore νμΌμ νλ‘μ νΈ μ΅μμ 루νΈμ μμ±ν ν
κ·Έ μμ λ²μ κ΄λ¦¬μ ν¬ν¨νμ§ μμ νμΌμ ν¨ν΄μ λ§κ² μμ±ν΄ μ€λ€.
• νμ€ Glob ν¨ν΄μ μ¬μ©νλ€.
• μ무κ²λ μλ λΌμΈμ΄λ, "#"μΌλ‘ μμνλ λΌμΈμ 무μνλ€.
• μ¬λμ(/)λ‘ μμνλ©΄ νμ λλ ν 리μ μ μ©λμ§(Recursivity) μλλ€.
• λλ ν 리λ μ¬λμ(/)λ₯Ό λμ μ¬μ©νλ κ²μΌλ‘ νννλ€.
• λλν(!)λ‘ μμνλ ν¨ν΄μ νμΌμ 무μνμ§ μλλ€.
<μ€μ μμ>
# νμ₯μκ° .aμΈ νμΌ λ¬΄μ
*.a
# μ λΌμΈμμ νμ₯μκ° .aμΈ νμΌμ 무μνκ² νμ§λ§ lib.aλ 무μνμ§ μμ
!lib.a
# νμ¬ λλ ν 리μ μλ TODOνμΌμ 무μνκ³ subdir/TODOμ²λΌ νμλλ ν 리μ μλ νμΌμ 무μνμ§ μμ
/TODO
# build/ λλ ν 리μ μλ λͺ¨λ νμΌ λ¬΄μ
build/
# doc/notes.txt νμΌμ 무μνκ³ doc/server/arch.txt νμΌμ 무μνμ§ μμ
doc/*.txt
# doc λλ ν 리 μλ λͺ¨λ .pdf νμΌ λ¬΄μ
doc/**/*.pdf
ignore λͺ©λ‘μ μμ΄λ μΆκ°(Add)νκ³ μΆμ κ²½μ°
-f (force) μ΅μ μ μ¬μ©νλ©΄ λλ€.
μ΄λ―Έ λ²μ κ΄λ¦¬ λμμ ν¬ν¨μλ νμΌμ μ μΈνκ³ μΆμ κ²½μ°
β» μλ μμ μ μννκΈ°μ μ νμ¬κΉμ§ μμ ν λ΄μμ commit νκ³ μ§νν΄μΌνλμ§ κ³ λ―Ό νμ
βΆ μ λͺ λ Ήμ΄λ₯Ό μ¬μ©νλ©΄ ν΄λΉ νμΌμ Untracked files μνλ‘ λμκ°λ€.
무μνκ³ μ νλ νμΌ(λλ ν΄λ)μ΄ μ΄λ―Έ λ²μ κ΄λ¦¬ λμμ ν¬ν¨λμ΄ μλ κ²½μ°,
μ¦, indexμ ν¬ν¨μ΄ λμ΄ μκΈ°μ indexμμ ν΄λΉ νμΌ(λλ ν΄λ)μ μ κ±°ν΄μΌ νλ€.
κ°λ Ή...
git rm -r --cached love.js
git status
".gitignore" νμΌμ ν΄λΉ νμΌλͺ ("love.js") μΆκ°
git status
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
https://zoosso.tistory.com/835
[Git] .gitignore μ€μ
.gitignore μ€μ gitμ λ³κ²½μ μ μΆμ μ μΆμ νλλ°, νΉμ νμΌλ€μ 무μ(ignore)νμ¬ μΆμ νμ§ μκ² ν μ μλ€. βΆ Log νμΌμ΄λ Build μ€μ μ κ΄λ¦¬ λμμμ μ μΈ μ²λ¦¬ν μ μλ€. ex) Intellij IDEμμ κ°
zoosso.tistory.com
κ²μ μͺ½ κΉμ΄κ·Έλ Έλ μ΄μ λ
node_modules
package-lock.json
docs
assets