์์ ์๋ SVN + tortoiseSVN ํด์ ์ฌ์ฉํ์๋ค. ํ์ฌ๋ GIT์ ์ฐ๊ณ ์๊ณ , tortoiseGIT์ ๋ค์ดํ์ฌ ์ฐ๊ณ ์๋ค.
์ฌ์ค, ์์ค fetch, pull ํด์ค๊ณ ๋์ ์์ ํ๊ณ commit, pushํ๋ฉด ๋์ง~ ์ด์ ๋๋ง ์๋ฉด ๋์ง ์๋~ ํ๋ ์ค๋งํจ์ด ์์๋ค.
๊ทผ๋ฐ ์ต๊ทผ์ ์ฌ๋ฌ๊ฐ์ง ์๋ฌ๋ฅผ ์ง๋ฉดํ๊ธฐ๋ ํ๊ณ , ์์ ๋ฉด์ ์์ svn๊ณผ git ์ฐจ์ด์ ๋ ์ ๋๋ก ๋ต๋ณํ์ง ๋ชปํ๋ ๊ฒ ๊ธฐ์ต๋๋ฉด์
์ ๋๋ก ์ข ์ ํ์์ฑ์ ๋๊ผ์๋ค. ๊ณ ๋์ฃผ ์ปค๋ฆฌํ๋ผ์๋ ์๊ธธ๋ ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฐ๋ผ๊ฐ๋ฉด์ ์ตํ๋ณด๋ ค๊ณ ํ๋ค.
UIํด : Source Tree(๋ง์ด ์ฌ์ฉํจ), GitKraken(UI ํ๋ คํจ)
๊น์ ์ฒ์ ๋ฐฐ์ธ ๋๋ ํฐ๋ฏธ๋์ ํตํด ๋ช ๋ น์ด๋ก ๋ฐฐ์ฐ๋ ๊ฒ์ด ์ข์!
ํฐ๋ฏธ๋ ํด์ ๋งฅ์ด๋ผ๋ฉด iTerm2, ์๋์ฐ๋ผ๋ฉด cmder ์ ์ถ์ฒ.
Cmder | Console Emulator
Total portability Carry it with you on a USB stick or in the Cloud, so your settings, aliases and history can go anywhere you go. You will not see that ugly Windows prompt ever again.
cmder.app
https://www.sourcetreeapp.com/
Sourcetree | Free Git GUI for Mac and Windows
A Git GUI that offers a visual representation of your repositories. Sourcetree is a free Git client for Windows and Mac.
www.sourcetreeapp.com
git config --list
git config --global -e
code .
git config --global core.editor "code"
git config --global core.autocrlf true
git์ ๋ช ๋ น์ด ๋จ์๋ก ์ด๋ฃจ์ด์ง ๊ฐ๋จํ ํ๋ก๊ทธ๋จ.
Git - Reference
Reference
git-scm.com
git์์ ์ฌ์ฉํ๋ ๋ช ๋ น์ด๋ค์ ๊ณต์์ฌ์ดํธ์์ ํ์ธํ ์ ์๋ค.
git status
// ๊ฐ๋จํ๊ฒ ๋ณด๊ธฐ
git status -s
์ํ ํ์ธ
๊ธฐ๋ณธ์ ์ผ๋ก master branch ์์ฑ๋จ.
1. working directory
๋ก์ปฌ์์ git๊ณผ ์ฐ๋๋ ํ๋ก์ ํธ ๋ด๋ถ ํ์ผ a.txt, b.txt, c.txt ์์
untracked / tracked (unmodified/modified)
staging ์ํค๋ ค๋ฉด git add ํ๋ฉด ๋๋ค.
git add a.txt
// ์ ์ฒด ์คํ
์ด์ง.
git add *
// ๋ชจ๋ ํ์ผ๋ค์ ํฌํจํ์ฌ ์คํ
์ด์ง. rm a.txt ํ ํ์ ์ฐ๋ฉด ์์์ ์คํ
์ด์ง์์ ๋นผ์ค.
git add .
2. staging area
a,b,c ์ค b,c ํ์ผ์ ๋ฐ์ํ ์ค๋น๊ฐ ๋์ด์๋ค๊ณ ์๊ฐํ๊ณ stagingํจ
3. .git directory
staging๋ ํ์ผ๋ค์ commitํ๋ฉด ๊น ๋๋ ํ ๋ฆฌ์ ์ฌ๋ผ๊ฐ๋ค. (๋ด ์ปดํจํฐ์๋ง ์ ์ฅ์ด ๋๋ค.)
message, author, date/time ์ ๋ณด๋ค์ด ๋ค ํ์คํ ๋ฆฌ์ ์ ์ฅ๋๋ค.
์ด๋ ๊ฒ ์ฌ๋ผ๊ฐ ํ์ผ๋ค์ checkout์ ํตํด ์ธ์ ๋ ์ง ์ ๋ฒ์ ์ผ๋ก ๋์๊ฐ ์ ์๋ค.
์ด ๊น ํ์คํ ๋ฆฌ๋ฅผ ๊นํ๋ธ์ ์ฌ๋ฆฌ๋ ค๋ฉด push ํด์ ์ ๋ก๋ํด์ผํ๋ค.
๋ฐ๋๋ pull์ด๋ค.
๊ณ์ํด์ tracking ํ๊ณ ์ถ์ง ์์ ํ์ผ๋ค์ .gitignore์ ๋ฑ๋กํด์ฃผ๊ธฐ.
// ์ด์ ๋ฒ์ ์ด๋ ๋น๊ต
git diff
git log
๊ฐ์๋ฅผ ๋ค ๋ค์ด๋ณด๋, ๋ด๊ฐ ๋์ถฉ ์๊ฐํ๊ณ ์๋ ๊ฐ๋ ๋ค ๋ชจ๋ ๋ง๊ธด ํ๋ค.
ํ์ง๋ง ์ด๋ ๊ฒ ์์ธํ ์๊ฒ ๋๋๊น ํจ์ฌ ์ ์ฌ์ฉํ๊ฒ ๋๋ ๊ฒ ๊ฐ๋ค.
tortoise ํด์ด
์ด๋ฐ์์ผ๋ก ์์ ๋ ๋ถ๋ถ์ ํ์ํด์ค์ ํธํ๊ฒ ํ์คํ ์๊ธด ํ๋๋ฐ,
๊ทธ๋ฅ ์ปค๋ฐ๋ง ์ฐ์ผ๋ฉด ๋๋ SVN๊ณผ๋ ๋ฌ๋ฆฌ ์คํ ์ด์ง, ์ปค๋ฐ, ํธ์ ํด์ผํ๋ git์์๋ sourcecode๊ฐ ๋ ํธํ ๊ฒ ๊ฐ๋ค.
Git / GitHub ์๋ด์
์ด๋ณด๋ฅผ ์ํ Git / GitHub ์๋ด์
subicura.com
๊ฐ์๋ฅผ ๋ฃ๊ธฐ ์ด๋ ค์ด ํ๊ฒฝ์์๋ ์ด ์๋ด์๋ฅผ ์ฐธ๊ณ ํด๋ณผ ์์ !!
'career' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๋ง๋ค๋ผํธ ๊ณํํ ๋ ธ์ ํ ํ๋ฆฟ (0) | 2023.11.16 |
---|---|
๊ฐ์ฅ ๋ชปํ๋ ์ฌ๋์ด ๋ผ๋ผ (0) | 2023.10.25 |
๊ณ ๋์ฃผ 12์ฃผ ์คํฐ๋ ์ปค๋ฆฌํ๋ผ 0์ฃผ์ฐจ CS50 ์๊ฐ (0) | 2022.10.13 |
ํ๋ก ํธ์๋ 12์ฃผ ์คํฐ๋ ์ปค๋ฆฌํ๋ผ (0) | 2022.09.28 |
[20220307 TIL] ํ๋ก ํธ์๋ ๊ด๋ จ ๊ธ (ํ ์ค์ ํ๋ก ํธ์๋) (0) | 2022.03.07 |