๋ฐ์ํ
[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์ ๋ฐ์๋์ด ํ์ผ์ด ์ญ์ ๋๋ค.
Reference
๋ฐ์ํ
'๐ฉ๐ปโ๐ปSTUDY > Git' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Git] Git push ์ค๋ฅํด๊ฒฐ (0) | 2022.03.24 |
---|---|
[Git] origin/master vs origin master์ ๋ค๋ฅธ์ (0) | 2020.11.18 |
[Git] ์๊ฒฉ์ ์ฅ์์ ์ฌ๋ฆฐ ์ปค๋ฐ ๋๋๋ฆฌ๊ธฐ (0) | 2020.10.24 |
[Git] 05. ๊นํ๋ธ๋ก ํ์ ํ๊ธฐ (0) | 2020.10.24 |
[Git] 04. ๊นํ๋ธ๋ก ๋ฐฑ์ ํ๊ธฐ (0) | 2020.10.21 |