Animated Hello Kitty Wink

๐Ÿถ๐Ÿพ/git&github

    [github] .DS_Store ํŒŒ์ผ ์‚ญ์ œ & .gitignore ์ถ”๊ฐ€

    1. .DS_Store ํŒŒ์ผ ์‚ญ์ œ find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch // ๋˜๋Š” ๊ณ ๋ƒฅ .DS_Store์žˆ๋Š” ํŒŒ์ผ์—์„œ rm -f .DS_Store 2. .gitignore ํŒŒ์ผ ์ƒ์„ฑ ํ›„ .DS_Store ์ถ”๊ฐ€ echo .DS_Store >> .gitignore

    [github] git add, commit, push ์ทจ์†Œ

    github git add, commit, push ์ž˜๋ชปํ–ˆ์„๋•Œ ์ทจ์†Œํ•˜๊ธฐ git add ์ทจ์†Œ(unstaged๋กœ ๋ณ€๊ฒฝ) git reset HEAD [file๋ช…] & git reset HEAD file๋ช…์ด ์—†์„ ๊ฒฝ์šฐ addํ•œ ์ „์ฒด ํŒŒ์ผ ๋Œ€์ƒ git commit ์ทจ์†Œ git log๋กœ commit ๋‚ด์—ญ ์กฐํšŒ git reset HEAD^ : ์ตœ์‹  ์ปค๋ฐ‹ ์ทจ์†Œ (^์˜ ๊ฐœ์ˆ˜๋งŒํผ ์ทจ์†Œ) git reset [--์˜ต์…˜] [์ทจ์†Œํ•  ์ปค๋ฐ‹ ํ•ด์‰ฌ] : ํŠน์ • ์ปค๋ฐ‹ ์ทจ์†Œ commit ๋’ค์— 04~ ์ด๊ฒŒ commit Hash ๋”ฐ๋ผ์„œ ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•์œผ๋กœ ์ปค๋ฐ‹ ์ทจ์†Œ git reset --hard 049989727b4d4471be715aa856922b67b4f32b03 or git reset HEAD^ +) --hard ๊ณผ๊ฑฐ ์ด๋ ฅ์œผ๋กœ ๋ฐœ์ƒํ•œ ..