IT/DevOps
Git์์ .gitignore๊ฐ ๋จนํ์ง ์์ ๋
Unused
2025. 4. 13. 23:42
git rm -r --cached .
git add .
git commit -m "untrack files contained in the .gitignore file"
๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ๋ฆฌํฌ์งํ ๋ฆฌ์์ .gitignore ํ์ผ์ ํฌํจ๋ ์ถ์ ๋ ํ์ผ์ ์ ๊ฑฐํ์ธ์.
์์ ๊ฐ์ด "git rm"์ ์ฌ์ฉํ์ฌ ๋ฆฌํฌ์งํ ๋ฆฌ์ ๋ชจ๋ ํ์ผ์ ์ ๊ฑฐ ๋ฐ ์ถ์ ํด์ ํ๊ณ , "git add"๋ฅผ ์ฌ์ฉํ์ฌ ๋ชจ๋ ํ์ผ์ ๋ค์ ์ถ๊ฐํ ๋ค์(.gitignore ํ์ผ์ ํฌํจ๋ ํ์ผ์ ์ถ๊ฐ๋์ง ์์) ๋ง์ง๋ง์ผ๋ก ๋ณ๊ฒฝ ๋ด์ฉ์ ์ปค๋ฐํฉ๋๋ค.
์ฐธ๊ณ : https://medium.com/sela-devops-team/gitignore-doesnt-work-e1566845d30a
My .gitignore doesn’t work
In this post we will see how to resolve this common issue and understand why it happens.
medium.com