๐ฉ๐ป๐ปSTUDY/Git
[Git] remote์ ์ด๋ฏธ pushํ ํ์ผ ์ง์ฐ๊ธฐ
jmjm
2020. 11. 4. 22:04
[Git] remote์ ์ด๋ฏธ pushํ ํ์ผ ์ง์ฐ๊ธฐ
์๊ฒฉ์ ์ฅ์์ ์ฌ๋ฆฐ ํ์ผ์ ์ญ์ ํ๋ค.
- ํ์ผ์ ์ญ์ ํ๋ ๋ฐฉ๋ฒ์๋ ๋๊ฐ์ง๊ฐ ์๋ค.
// lcoal
$ git rm [File Name]
// remote
$ git rm --cashed [File Name]
remote์ ์ฌ๋ผ๊ฐ ํ์ผ์ --cashed
๋ฅผ ๋ถ์ฌ ์ค์ผ ํ๋ค.
// ํน์ ํ์ผ ์ญ์
$ git rm --cached include/header.html
// ํด๋ ํ์์ ๋ชจ๋ ํ์ผ ์ญ์
$ git rm --cashed -r .include
์ญ์ ํ git status ๋ก ํ์ธํ๊ณ , ์ด ์ํ๋ฅผ remote์ ์ ์ฉํด์ผ ํ๋ค.
// commit ํ,
$ git commit -m "Fix untracked files"
// push ํ๋ค.
$ git push origin master
commit๊ณผ push๋ฅผ ํด์ฃผ๋ฉด remote์ ๋ฐ์๋์ด ํ์ผ์ด ์ญ์ ๋๋ค.