250x250
Rainbow๐ŸŒˆCoder
My dev Note๐Ÿ“’
Rainbow๐ŸŒˆCoder
์ „์ฒด ๋ฐฉ๋ฌธ์ž
์˜ค๋Š˜
์–ด์ œ
  • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (411)
    • ๊ณต์ง€์‚ฌํ•ญ (0)
    • Debugger (10)
      • Visual Studio Debugger (1)
      • Chrome DevTools (3)
      • Visual Studio Code Debugger (4)
      • eclipse (1)
      • intelliJ (1)
    • OOP (2)
      • OOP (2)
    • TypeScript (54)
      • ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ TypeScript (54)
    • Javascript (87)
      • Javascript (45)
      • Node.js (19)
      • React (5)
      • FE ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ค์ • (3)
      • React์™€ Node ๊ฐ™์ด ๋•Œ๋ ค์žก๊ธฐ (6)
      • next.js (2)
      • pixi.js (7)
    • ๋งˆํฌ์—… (23)
      • Html & Css (23)
    • C# (80)
      • C# (12)
      • ์ด๊ฒƒ์ด C#์ด๋‹ค (68)
    • C++ (30)
      • c++ (27)
      • win api (3)
    • Unity (18)
      • Unity(๊ธฐ์ดˆ) (8)
      • Unity(C#์ค‘๊ธ‰) (5)
      • ์œ ๋‹ˆํ‹ฐ ํฌํ†ค(๋„คํŠธ์›Œํฌ) (4)
      • unity c# MyCode (1)
    • Java & Spring (29)
      • Java (11)
      • ์Šคํ”„๋ง (8)
      • Java Algorithm (9)
      • Javs Data Structures (1)
    • ์ž๋ฃŒ๊ตฌ์กฐ์™€ ์•Œ๊ณ ๋ฆฌ์ฆ˜ (15)
      • ์ž๋ฃŒ๊ตฌ์กฐ (5)
      • ์•Œ๊ณ ๋ฆฌ์ฆ˜ (10)
    • ํ˜•์ƒ๊ด€๋ฆฌ (15)
      • Git (11)
      • ์†Œ์ŠคํŠธ๋ฆฌ (3)
    • ๊ทธ๋ž˜ํ”ฝ์Šค (7)
      • WebGl (7)
    • AWS (3)
      • aws (3)
    • ๋ฆฌ๋ˆ…์Šค (5)
      • ๋ฆฌ๋ˆ…์Šค (5)
    • ์ฑ… ๋ฆฌ๋ทฐ (13)
      • ํด๋ฆฐ์ฝ”๋“œ(์ฑ…๋ฆฌ๋ทฐ) (3)
      • ์œ ์ง€๋ณด์ˆ˜๊ฐ€๋Šฅํ•œ์ฝ”๋”ฉ์˜๊ธฐ์ˆ C#ํŽธ(์ฑ…๋ฆฌ๋ทฐ) (1)
      • ๋ฆฌํŒฉํ† ๋ง(์ž๋ฐ”์Šคํฌ๋ฆฝํŠธํŒ) (9)
    • Server (2)
      • ๊ฒŒ์ž„ ์„œ๋ฒ„(๋„คํŠธ์›Œํฌ, ๋ฉ€ํ‹ฐ์“ฐ๋ ˆ๋“œ,OS) (2)
    • ์„ค๊ณ„, ์•„ํ‚คํ…์ณ (4)
    • ํŒŒ์ด์ฌ (5)
    • ๋””์ž์ธํŒจํ„ด (2)
    • mocha (2)
    • Jest (1)
    • Spine (1)
    • ์ธ๊ณต์ง€๋Šฅ (1)
      • ํ˜ผ์ž๊ณต๋ถ€ํ•˜๋Š”๋จธ์‹ ๋Ÿฌ๋‹+๋”ฅ๋Ÿฌ๋‹ (1)

๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

  • ํ™ˆ
  • ํƒœ๊ทธ
  • ๋ฐฉ๋ช…๋ก

๊ณต์ง€์‚ฌํ•ญ

์ธ๊ธฐ ๊ธ€

ํƒœ๊ทธ

  • ์ปดํฌ์ง€์…˜
  • MySQL
  • ์œ„์ž„
  • ใ…ฃใ„ท

์ตœ๊ทผ ๋Œ“๊ธ€

์ตœ๊ทผ ๊ธ€

ํ‹ฐ์Šคํ† ๋ฆฌ

hELLO ยท Designed By ์ •์ƒ์šฐ.
Rainbow๐ŸŒˆCoder

My dev Note๐Ÿ“’

ํ˜•์ƒ๊ด€๋ฆฌ/Git

[Git] git ignore

2022. 12. 21. 14:48
728x90

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) ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

git add -f {File Name}

 

 

์ด๋ฏธ ๋ฒ„์ „๊ด€๋ฆฌ ๋Œ€์ƒ์— ํฌํ•จ์žˆ๋Š” ํŒŒ์ผ์„ ์ œ์™ธํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ

โ€ป ์•„๋ž˜ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๊ธฐ์ „์— ํ˜„์žฌ๊นŒ์ง€ ์ž‘์—…ํ•œ ๋‚ด์—ญ์„ commit ํ•˜๊ณ  ์ง„ํ–‰ํ•ด์•ผํ•˜๋Š”์ง€ ๊ณ ๋ฏผ ํ•„์š”

git rm -r --cached {ํŒŒ์ผ๋ช…}

โ–ถ ์œ„ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํ•ด๋‹น ํŒŒ์ผ์€ 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
728x90

'ํ˜•์ƒ๊ด€๋ฆฌ > Git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[git] ์ถฉ๋Œ๋‚  ๋•Œ, git reset HEAD โ€”hard  (0) 2023.01.19
[Git] ์—…๋ฌด์šฉ, ๊ฐœ์ธ์šฉ ๊นƒ ๊ณ„์ • ๋ถ„๋ฆฌ  (0) 2022.12.07
[๊นƒํ—ˆ๋ธŒ ๋ฆฌ๋“œ๋ฏธ] ๊ธฐ์ˆ ์Šคํƒ ์•„์ด์ฝ˜ ์ถ”๊ฐ€ํ•˜๊ธฐ  (0) 2022.05.08
[Git]์ง€์—ญ ์ €์žฅ์†Œ์˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์—…๋กœ๋“œํ•˜๋ ค๋‹ค defualt ๋ธŒ๋Ÿฐ์น˜๋Š” master๊ฐ€ ์•„๋‹ˆ๋ผ origin์ธ ๊ฑด์— ๊ด€ํ•˜์—ฌ  (0) 2022.04.10
[Git] branch ๋”ฐ๊ธฐ  (0) 2022.01.18
    'ํ˜•์ƒ๊ด€๋ฆฌ/Git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
    • [git] ์ถฉ๋Œ๋‚  ๋•Œ, git reset HEAD —hard
    • [Git] ์—…๋ฌด์šฉ, ๊ฐœ์ธ์šฉ ๊นƒ ๊ณ„์ • ๋ถ„๋ฆฌ
    • [๊นƒํ—ˆ๋ธŒ ๋ฆฌ๋“œ๋ฏธ] ๊ธฐ์ˆ ์Šคํƒ ์•„์ด์ฝ˜ ์ถ”๊ฐ€ํ•˜๊ธฐ
    • [Git]์ง€์—ญ ์ €์žฅ์†Œ์˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์—…๋กœ๋“œํ•˜๋ ค๋‹ค defualt ๋ธŒ๋Ÿฐ์น˜๋Š” master๊ฐ€ ์•„๋‹ˆ๋ผ origin์ธ ๊ฑด์— ๊ด€ํ•˜์—ฌ
    Rainbow๐ŸŒˆCoder
    Rainbow๐ŸŒˆCoder
    ๋ชฐ๋ผ๋„ ๊ฒฐ๊ตญ์€ ์•„๋Š” ๊ฐœ๋ฐœ์ž, ๊ทธ๋Ÿฐ ์‚ฌ๋žŒ์ด ๋˜๊ธฐ ์œ„ํ•œ ๋งค์ผ์˜ ํ•œ๊ฑธ์Œ

    ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”