๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ˜ผ ๊นƒํ—ˆ๋ธŒ

ํŠน์ • ํ•˜์œ„ํด๋”๋งŒ git cloneํ•˜๊ธฐ

๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด๋ฅผ ๋‹ค์ˆ˜ ์‚ฌ์šฉ.

์œˆ๋„์šฐ์—๋„ cmd์ฐฝ์„ git Bash๋กœ ์‚ฌ์šฉํ•˜๋ฉด, ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด๋“ค์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


1. ์ž‘์—… ํด๋” ์ƒ์„ฑ

mkdir test

cd test


2. git ๋ช…๋ น์–ด๋ฅผ ์“ธ ์ˆ˜ ์žˆ๋„๋ก ์ดˆ๊ธฐํ™”

git init


3. Sparse Checkout ๊ธฐ๋Šฅ์„ ํ™œ์„ฑํ™”

git config core.sparseCheckout true


3. cloneํ•˜๊ธฐ ์›ํ•˜๋Š” remote ์ €์žฅ์†Œ์˜ ์ฃผ์†Œ ์„ ์–ธ

git remote add -f origin <remote git repository url>

<>์œ„์น˜์— ํ•ด๋‹น ์ €์žฅ์†Œ ์ฃผ์†Œ ์ž…๋ ฅ (<>๋Š” ๋นผ์•ผํ•จ)


4. clone ๋˜๋Š” pullํ•˜๊ธฐ ์›ํ•˜๋Š” ํŠน์ • ํ•˜์œ„ ํด๋” ๋˜๋Š” ํŒŒ์ผ์˜ Path ์„ ์–ธ

echo <"sub-folder or file you want to check out"> >> .git/info/sparse-checkout

<>์œ„์น˜์— ์ฒดํฌ์•„์›ƒํ•˜๊ธฐ ์›ํ•˜๋Š” ์„œ๋ธŒํด๋”๋‚˜ ํŒŒ์ผ ์„ ""์•ˆ์— ์ž…๋ ฅ (<>๋Š” ๋บด์•ผํ•จ)


5. Pullํ•˜๋ฉด ๋.

git pull origin master