๐ถ๐พ/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 ๊ณผ๊ฑฐ ์ด๋ ฅ์ผ๋ก ๋ฐ์ํ ..