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

Git5

git lfs ์˜ฌ๋ ธ๋˜ ๋ฐ์ดํ„ฐ ์‚ญ์ œ lfs๋กœ ์˜ฌ๋ ธ๋˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋”์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š์•„ ์‚ญ์ œํ•˜๊ณ  ์‹ถ์—ˆ๋‹ค.์ตœ์ข…์ ์œผ๋กœ ์›ํ–ˆ๋˜ ์•ก์…˜์€ ์ถ”์ ํŒŒ์ผ ์‚ญ์ œ, ์›๋ณธ ๋ฐ์ดํ„ฐ ๋กœ์ปฌ๋งŒ ์œ ์ง€, lfs ์ž์ฒด uninstall 1. lfs์— ์˜ฌ๋ผ๊ฐ„ ์ถ”์ ํŒŒ์ผ -> ์›๋ณธ ํŒŒ์ผ๋กœ ๋ณ€๊ฒฝgit lfs fetch --allgit lfs checkout 2. lfs ๋ฐ์ดํ„ฐ ์ถ”์  ์‚ญ์ œgit lfs untrack "src/main/resources/data.csv"git lfs untrack "src/test/resources/testData.csv" ์ด๋•Œ untrack๋งŒ ํ•˜๋ฉด ๊ณ„์† git lfs ls-files ํ• ๋•Œ ๋ณด์ด๋”๋ผGit ์บ์‹œ์™€ ์ธ๋ฑ์Šค๋„ ์ •๋ฆฌํ•ด์ค˜์•ผํ•œ๋‹ค๊ณ  ํ•จgit rm --cached "src/main/resources/data.csv"git rm --cached "src/t.. 2024. 11. 3.
Clone์œผ๋กœ ์ƒ์„ฑํ•œ ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™” ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์‹œ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ๋งŒ๋“ค๊ณ  ์ƒˆ๋กœ ๊ตฌ์„ฑํ•ด์„œ ์˜ฌ๋ฆฌ๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ์ง€๋งŒ, ๊ธฐ์กด ํ”„๋กœ์ ํŠธ๋ฅผ Clone ํ•˜์—ฌ, ๊ธฐ์กด Git ์—ฐ๊ฒฐ์„ ๋Š๊ณ  Commit๋“ค์„ ์ดˆ๊ธฐํ™” ํ•œ ํ›„ ํ•„์š” ํŒŒ์ผ๋“ค๋งŒ ์ถ”๋ ค์„œ ์ปค๋ฐ‹ ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์ƒˆ๋กœ ๊ตฌ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•. Clone ๋œฌ ์›๊ฒฉ ๋ถ€ํ„ฐ ๋Š๊ธฐ git remote -v git remote remove origin ์›๊ฒฉ ์—ฐ๊ฒฐ ๋Š๊ณ  ๋‚œ ํ›„ Git ์ดˆ๊ธฐํ™” rm -rf .git git init ์ฒซ Commit ์ž‘์„ฑ git add . git commit -m "Initial Commit" ์›๊ฒฉ ์ €์žฅ์†Œ(Bitbucket, github ...)์— ์ƒˆ๋กœ์šด Repository ์ƒ์„ฑ git ์ €์žฅ์†Œ ์—ฐ๊ฒฐ ํ›„ ํ‘ธ์‰ฌ git remote add origin {remoteUrl} git push -u --force or.. 2022. 5. 28.
[GIT] Reset ๋ช…๋ น์–ด git reset –hard b1f78bc ๋‹ค ๋‚ ๋ ค๋ฒ„๋ฆผ git reset –soft b1f78bc ์ž‘์—… ์ด๋ ฅ ๋‹ค ๋ณด์กด ๋ฐ stage์— ๊ณ ๋Œ€๋กœ ์žˆ์Œ git reset –mixed b1f78bc (default) ์ž‘์—… ์ด๋ ฅ ๋ณด์กด์ด๋‚˜ ์ปค๋ฐ‹์„ ์œ„ํ•ด ๋‹ค์‹œ ์ง€์ •ํ•ด์•ผํ•จ git reset HEAD~1 : ํ˜„์žฌ๋ถ€ํ„ฐ 1๊ฐœ ์ „ 2022. 3. 29.
[GIT] Clone์œผ๋กœ ์‹ ๊ทœ ์ƒ์„ฑ ํ”„๋กœ์ ํŠธ ์ดˆ๊ธฐํ™” 1. Clone ๋œฌ ํ”Œ์  ์›๊ฒฉ ๋Š๊ธฐ git remote -v git remote remove origin 2. ์›๊ฒฉ ๋Š์–ด์ฃผ๊ณ  ๋‚œ ๋’ค rm -rf .git git init git add . git commit -m "initial commit" 3. BitBucket๊ฐ€์„œ ์ƒˆ๋กœ์šด Repository ์ƒ์„ฑ 4. Git ์ €์žฅ์†Œ ์—ฐ๊ฒฐ ํ›„ ๊ฐ•์ œ push git remote add origin {git remote url} git push -u --force origin master 2022. 3. 20.
๋กœ์ปฌ ํ”„๋กœ์ ํŠธ๋ฅผ GitHub Repository๋กœ ์ƒ์„ฑ & ์—ฐ๊ฒฐ ๋กœ์ปฌ์— ์ธํ…”๋ฆฌ์ œ์ด์—์„œ ์ƒˆ๋กœ ์ƒ์„ฑํ•œ ํ”„๋กœ์ ํŠธ๋ฅผ ๊นƒํ—ˆ๋ธŒ์— ์˜ฌ๋ฆฐ๋‹ค. ํ„ฐ๋ฏธ๋„๊ณผ ํˆด ํ™œ์šฉํ•ด์„œ ์—…๋กœ๋“œ ์„ฑ๊ณตํ•œ ์ผ€์ด์Šค.. ์‚ฌ์ „ ์ž‘์—… ์ธํ…”๋ฆฌ์ œ์ด์™€ ๊นƒ ํ—™์ด ์—ฐ๊ฒฐ์ด ๋˜์–ด ์žˆ์–ด์•ผํ•จ (ํ•„์ˆ˜๋Š” ์•„๋‹ˆ๋‚˜ ํŽธํ•จ) ์ปค๋งจ๋“œ+, (setting) : github -> + -> ๋‚˜์˜ ๊นƒํ—™ ๊ณ„์ • ๋“ฑ๋ก (๋“ฑ๋ก ์‹œ ํ† ํฐ ์‚ฌ์šฉ ๊ถŒ์žฅ. ์—ฌ๊ธฐ์„œ ์„ค๋ช…ํ•˜๋Š” ๊ถŒํ•œ์ด ๋ชจ๋‘ ์žˆ๋Š” ํ† ํฐ์ด์–ด์•ผ๋งŒ ๋กœ๊ทธ์ธ ๊ฐ€๋Šฅ) ์ธํ…”๋ฆฌ์ œ์ด ๋กœ์ปฌ ํ”Œ์  ์ƒ์„ฑ ๋ฐ ๊ฐœ๋ฐœ ์ž‘์—… VCS -> Enable Version Control Integration Git ์„ ํƒ ์™„๋ฃŒ ์‹œ -> Created Git repository in /๊ฒฝ๋กœ/๊ฒฝ๋กœ/๊ฒฝ๋กœ/projectnm ๋ฉ”์„ธ์ง€ ํ•˜๋‹จ์— ํŒ์—… ๋œธ Git -> Github -> Share Project on Github ์ผ๋‹จ ์ด๋ ‡๊ฒŒ ํ–ˆ๋”๋‹ˆ ๊นƒํ—™์— ๋ฆฌํฌ ์ƒ.. 2022. 3. 2.