Git LFS๋ ?
GitHub๋ 100MB ์ด์์ ํ์ผ์ ์ฌ๋ฆด ์ ์๋ค.
Git LFS๋ ๋์ฉ๋ ํ์ผ์ ๋ค๋ฃจ๊ธฐ ์ํ ์คํ์์ค ํ๋ก์ ํธ์ด๋ค.
Git LFS๋ ๋์ฉ๋์ ํ์ผ๋ค์ Git ๋ด๋ถ์ ํ ์คํธ ํฌ์ธํฐ๋ก ๋์ฒดํ๊ณ , ํ์ผ์ ๋ด์ฉ์ ์๊ฒฉ ์๋ฒ์ ์ ์ฅํ๋๋ก ํ๋ค.
Git LFS ๋ ํฌ์งํ ๋ฆฌ clone ์ค๋ฅ?
LFS๋ก ๋ฑ๋ก๋ ๋ ํฌ์งํ ๋ฆฌ๋ฅผ ๊ทธ๋๋ก clone ๋ฐ์ผ๋ฉด
Git LFS ์๋ฒ๋ฅผ ์ถ์ ํ ์ ์๋ ํ ์คํธ ํฌ์ธํฐ๋ง ์ ์ฅ๋๊ณ , ์๋์ ์ฝ๋๋ค์ ๋ถ๋ฌ์ค์ง ์์ ์ ์๋ค.
์๋์ ๊ฐ์ ๊ณผ์ ์ผ๋ก ํด๊ฒฐํ ์ ์๋ค.
1. macOS ์์ git-lfs ์ค์นํ๊ธฐ
brew install git-lfs
2. Repository clone
git-lfs๋ฅผ install ํ๊ธฐ ์ ์ repo์๋ lfs ๊ฐ ์ ์ฉ๋์ง ์๋๋ค.
์ด์ ์ ๋ฐ์ repository๋ ์ง์ฐ๊ณ ๋ค์ git clone์ ํด์ฃผ๊ณ , ํด๋น repository๋ก ์ด๋ํ๋ค.
git clone "url"
cd ๋ ํฌ์งํ ๋ฆฌ๋ช
3. Repository ์ git lfs ์ ์ฉ
git lfs install
ํด๋น repository์์ git lfs๋ฅผ ๋ค์ด๋ก๋ ํด์ค๋ค.
** ๋ง์ฝ, ์ด์ ์ ํด๋น ์ ๋ก๋ ํ์ผ์ ๋ํ git add ๊ธฐ๋ก์ด ์กด์ฌํ๋ค๋ฉด unstaging ํด์ค๋ค.
git rm -r --cached "*"
4. git lfs pull ์ ํตํด large file ํ์ด์ฃผ๊ธฐ
git lfs pull
git lfs pull ๊น์ง ํด์ฃผ๋ฉด ์ด์ lfs ๊ฐ ์ ์ฉ๋ ํ์ผ๋ค์ด ์ ์ด๋ฆด ๊ฒ์ด๋ค.
์ฐธ๊ณ
https://git-lfs.com/
https://wooono.tistory.com/284
https://sanghyu.tistory.com/178