์๋ ์๋ฌธ์๋ก ์์ํ๋ barChartSlice.ts ํ์ผ์ด๋ฆ์ vscode์์ ๋๋ฌธ์๋ก BarChartSlice.ts ๋ฐ๊พธ๊ณ , github์ ์๊ฒฉ์ ์ฅ์๋ก ํธ์ฌํ๋ค.
ํ์ง๋ง, ์ ๋ฐ์ดํธ๋ ์๊ฒฉ์ ์ฅ์์๋ ๋๋ฌธ์๋ก ๋ฐ๋ ํ์ผ๋ช ์ด ๋ฐ์์ด ์๋์ด์์๋ค.
git์ ๋/์๋ฌธ์ ๊ตฌ๋ถ์ ํ์ง ๋ชปํ๋ค.
๋ฐ๋ผ์ ํ์ผ ์ด๋ฆ์ ๋๊ฐ์ง๋ง ๋/์๋ฌธ์๋ง ๋ณ๊ฒฝํด์ ๋ค์ ์๊ฒฉ์ ์ฅ์๋ก push ํ๋ ๊ฒฝ์ฐ, rename ํด์ฃผ๋ ๋ช ๋ น์ด๋ก ์ง์ ํ์ผ์ด๋ฆ์ ์์ ํด์ฃผ์ด์ผ ํ๋ค.
์ด๋ ์ฐ๋ ๋ช ๋ น์ด?
git mv
mv๋ move๋ฅผ ํํํ ์ฝ์์ธ๋ฐ, ๊ณต์๋ฌธ์์ ๋ณด๋ฉด move or rename a file, a directory๋ผ๊ณ ๋์จ๋ค.
git mv <์๋ณธ ํ์ผ> <๋ณ๊ฒฝํ ํ์ผ>
ํ์ผ์ ์ด๋ฆ์ rename ํด์ค๋ค.
git mv <์๋ณธ ํ์ผ> <๋ณ๊ฒฝํ ๋ชฉ์ ์ง directory>
ํ์ผ์ด ์์นํด์๋ ๋๋ ํ ๋ฆฌ ์์น๋ฅผ ์ด๋์ํจ๋ค.
๊ทธ๋ฐ๋ฐ ํ์ผ ์ด๋ฆ์ ๋์๋ฌธ์๋ง ๋ค๋ฅด๊ฒ ๋ณ๊ฒฝํ ๋, git mv <์๋ณธ ํ์ผ์ด๋ฆ> <๋ฐ๊ฟ ํ์ผ์ด๋ฆ> ์ ํ ๊ฒฝ์ฐ, ๋ง์ฐฌ๊ฐ์ง๋ก git์ ๋์๋ฌธ์๋ฅผ ๊ตฌ๋ถํ์ง ๋ชปํ๋ฏ๋ก ๋๊ฐ์ ์ด๋ฆ์ผ๋ก ์ธ์ํด์ ์๊ฒฉ์ ์ฅ์์๋ ๋ก์ปฌ์์ ๋ฐ๊พผ ์ด๋ฆ๋๋ก ์ฌ๋ผ๊ฐ์ง ์๋๋ค.
๋ฐ๋ผ์, ๋ณ๊ฒฝํ ํ์ผ์ ์์์ ์ผ๋ก ์์ ๋ค๋ฅธ ์ด๋ฆ์ผ๋ก ๋ณ๊ฒฝํด์ฃผ๊ณ , ๊ทธ ์์ ํ์ผ์ ๋ด๊ฐ ์ํ๋ ๋์๋ฌธ์ ํ์ผ ์ด๋ฆ์ผ๋ก ๋ค์ ์ฌ๋ ค์ผ ๋๋ค.
์์)
barChartSlice๋ฅผ BarChartSlice๋ก ๋ณ๊ฒฝํ๊ณ ์ถ๋ค.
barChartSlice๋ฅผ barChartSlice2๋ก ์์๋ก ๋ณ๊ฒฝํด์ฃผ๊ณ ,
barChartSlice2๋ฅผ BarChartSlice๋ก ๋ณ๊ฒฝ ํด์ฃผ์๋ค.
์ ๊ฒฝ์ฐ, git mv ์ธ์๋ก ํ์ผ๋ช ์ด ์๋ ํ์ผ์ ์๋๊ฒฝ๋ก๋ฅผ ์ ์ด์ฃผ์๋ค.
ํ์ผ path๋ก ์ ์ง ์๊ณ , ํ์ผ๋ช ์ ์ ์ด์ฃผ์ด๋ ๋๊ฐ์ด ์๋ํ๋ค.
git mv ๋ช ๋ น์ด๋ก ํ์ผ์ด๋ฆ ๋ณ๊ฒฝ ์ดํ ์๊ฒฉ ์ ์ฅ์์๋ ๋ฐ์๋ ๋ชจ์ต
Reference
https://git-scm.com/docs/git-mv
Git - git-mv Documentation
Each time a superproject update moves a populated submodule (e.g. when switching between commits before and after the move) a stale submodule checkout will remain in the old location and an empty directory will appear in the new location. To populate the s
git-scm.com
https://www.lesstif.com/gitbook/git-git-rename-file-or-folder-54952878.html
git ํ์ผ์ด๋ ํด๋ ์ด๋ฆ ๋ณ๊ฒฝ (git rename file or folder)
๋ณ๊ฒฝ ์ฌํญ์ ์ถ์ ํ๊ธฐ ์ด๋ ค์์ง๋ ์ ๋ ์ญ์ ํ add ํ์ง ๋ง์ธ์.
www.lesstif.com
https://velog.io/@whddnjs1715/git-git-mv-%EB%AA%85%EB%A0%B9%EC%96%B4
[git] git mv ๋ช ๋ น์ด
์ค๋์ ๊ฒฝํ๋ด์ ๊ธฐ๋ฐ์ผ๋ก git ๋ช ๋ น์ด์ ๋ํด ์๊ฐํ๊ฒ ์ต๋๋ค!๋ค๋ฅธ ์ฌ๋๋ค๊ณผ ๊ฐ์ด ํ๋ก์ ํธ๋ฅผ ํ๋ค๋ณด๋ฉด git์ ์ฌ์ฉํ์ฌ ์์ ์ ํ๊ฒ๋ฉ๋๋ค.๊ทธ๋ฌ๋ค ๋ณด๋ฉด ์๋ก ํด๋๊ตฌ์กฐ๊ฐ ๋ค๋ฅด๊ฑฐ๋ ํด๋๋ช ์ด ๋ค๋ฅธ
velog.io