SlideShare a Scribd company logo
Geun-Hyung Kim
UMCL @ Dong-Eui University
Introduction to
Git/GitHub
๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ
Local Version Control / Central Version Control / Distributed Version Control
Git - Basic
Git - Tutorial : Just doing small work with Git
Configuration
Create Repository
Git Workflow
GitHub - Tutorial: Just doing small work with remote storage
Create/Delete Repository
Create branch
Open Pull Request /Merge Pull Request
๋ชฉ ์ฐจ
๋‹ด๊ณ  ์žˆ๋Š” ๋‚ด์šฉ
Version Control System
What is Version Control?
A category of software tools that help a software team manage
changes to source code over time.
(์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ํŒ€์ด ๊ฐœ๋ฐœ ์ค‘์— ์†Œ์Šค์ฝ”๋“œ์˜ ๋ณ€๊ฒฝ ๊ด€๋ฆฌ๋ฅผ ๋•๋Š” ์†Œํ”„ํŠธ
์›จ์–ด ๋„๊ตฌ)
๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ
๋ชจ๋“  ํŒŒ์ผ ๋ณ€ํ™”๋ฅผ ์‹œ๊ฐ„์— ๋”ฐ๋ผ ๋ฒ„์ „ ๊ด€๋ฆฌ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ๊ธฐ๋กํ•œ ํ›„ ๋‚˜์ค‘์— ํŠน์ •
์‹œ์ ์˜ ๋ฒ„์ „์„ ๋‹ค์‹œ ๊บผ๋‚ด์˜ฌ ์ˆ˜ ์žˆ๋Š” ์‹œ์Šคํ…œ
๊ทธ๋ž˜ํ”ฝ ๋””์ž์ด๋„ˆ๋‚˜ ์›น ๋””์ž์ด๋„ˆ๋„ ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ(VCS - Version Control System)์„ ์‚ฌ์šฉ ๊ฐ€๋Šฅ
VCS๋กœ ์ด๋ฏธ์ง€๋‚˜ ๋ ˆ์ด์•„์›ƒ์˜ ๋ฒ„์ „(๋ณ€๊ฒฝ ์ด๋ ฅ ํ˜น์€ ์ˆ˜์ • ๋‚ด์šฉ)์„ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ํ˜„๋ช…
๊ฐ ํŒŒ์ผ์„ ์ด์ „ ์ƒํƒœ๋กœ ๋˜๋Œ๋ฆด ์ˆ˜ ์žˆ์Œ
ํ”„๋กœ์ ํŠธ ์ „์ฒด๋ฅผ ์ด์ „ ์ƒํƒœ๋กœ ๋˜๋Œ ์ˆ˜ ์žˆ์Œ
์‹œ๊ฐ„์— ๋”ฐ๋ผ ์ˆ˜์ • ๋‚ด์šฉ์„ ๋น„๊ตํ•ด ๋ณผ ์ˆ˜ ์žˆ์Œ
๋ˆ„๊ฐ€ ๋ฌธ์ œ๋ฅผ ์ผ์œผ์ผฐ๋Š”์ง€ ์ถ”์ 
VCS๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํŒŒ์ผ ์žƒ๊ฑฐ๋‚˜ ์ž˜๋ชป ์ˆ˜์ •๋˜์—ˆ์„ ๋•Œ ์‰ฝ๊ฒŒ ๋ณต๊ตฌ
Benefits (์žฅ์ )
A complete long-term change history of every file
ํŒŒ์ผ ์ƒ์„ฑ, ์‚ญ์ œ, ๋ณ€๊ฒฝ๊ณผ ๊ฐ™์€ ํŒŒ์ผ ๋ณ€๊ฒฝ์— ๋Œ€ํ•œ ์ „์ฒด ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ๊ธฐ๋กํ•˜๊ณ  ์žˆ์–ด ๊ณผ๊ฑฐ์˜ ์ž„์˜์˜ ๋ฒ„์ „์„ ์ด์šฉ
๊ฐ€๋Šฅ
Branching and merging
branch(๋ธŒ๋žœ์น˜) ์ƒ์„ฑ ๊ธฐ๋Šฅ์„ ์ด์šฉํ•˜์—ฌ ํŒ€์›์ด ๋…์ž์ ์ธ ๊ฐœ๋ฐœ์„ ์ˆ˜ํ–‰
๊ฐ ๊ฐœ๋ฐœ์ž๋“ค์ด ๊ฐ ๋ธŒ๋žœ์น˜์˜ ์ˆ˜์ •์—์„œ ์„œ๋กœ ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๊ฒ€์ฆ
์ˆ˜ํ–‰ ๊ฒฐ๊ณผ๋ฅผ ํ†ตํ•ฉํ•˜์—ฌ ์ตœ์ข… ๊ฐœ๋ฐœ์˜ ๋ฐฐํฌ ๋ฒ„์ „์„ ๊ฒฐ์ •
Traceability
๊ฐ ๋ณ€๊ฒฝ์— ๋Œ€ํ•œ ๋ชฉ์ ๊ณผ ์˜๋„๋ฅผ ์„ค๋ช…ํ•˜๋Š” ์ฃผ์„์„ ์ ์„ ์ˆ˜ ์žˆ๋„๋ก ํ•˜์—ฌ ํŒŒ์ผ ๋ณ€๊ฒฝ์— ๋Œ€ํ•ด ์ถ”์ ์ด ๊ฐ€๋Šฅ
Version Control System
What can we do with VCS?
๊ฐ„๋‹จํ•œ ๋กœ์ปฌ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ ์ •๋ณด๋ฅผ ๊ด€๋ฆฌ
RCS (Revision Control System): ํŒŒ์ผ์—์„œ ๋ณ€๊ฒฝ๋œ ๋ถ€๋ถ„ (Patch Set)์„ ํŠน
๋ณ„ํ•œ ํ˜•์‹์˜ ํŒŒ์ผ๋กœ ์ €์žฅํ•˜์—ฌ ํŒŒ์ผ์˜ ํŠน์ • ์‹œ์ ์œผ๋กœ ๋˜๋Œ๋ฆด ์ˆ˜ ์žˆ์Œ
Version Control System
Local Version Control
Check-in
Check-out
<source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž์™€ ํ•จ๊ป˜ ์ž‘์—…์„ ํ•˜๋ฉฐ ์ž‘์—…์— ๋Œ€ํ•œ ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•ด ๋„คํŠธ์›Œํฌ์— ์„œ๋ฒ„๋ฅผ ์ด์šฉํ•˜๋Š” ๋ฐฉ
๋ฒ• (์˜ˆ: CVS, Subversion, Perforce ๊ฐ™์€ ์‹œ์Šคํ…œ )
์žฅ์ : ํ”„๋กœ์ ํŠธ์— ์ฐธ์—ฌํ•˜๋Š” ๊ฐœ๋ฐœ์ž ๋ˆ„๊ฐ€ ๋ฌด์—‡์„ ํ•˜๊ณ  ์žˆ๋Š”์ง€ ๊ด€๋ฆฌ ์šฉ์ด, ํ•˜๋‚˜์˜ VCS๋กœ ๊ด€๋ฆฌ ๊ฐ€๋Šฅ
๋‹จ์ : ์ค‘์•™์˜ ์„œ๋ฒ„๊ฐ€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ๋ฐฑ์—…์„ ํ•  ๋ฐฉ๋ฒ•์ด ์—†์Œ
Version Control System
Centralized VCS (CVCS)
<source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
Check-in (Commit)
Check-out
Check-in (Commit)
Check-out
Version Control System
Distributed VCS (DVCS)
์ €์žฅ์†Œ ์ „์ฒด๋ฅผ ๋กœ์ปฌ ํ˜ธ์ŠคํŠธ๋กœ ๋ณต์‚ฌํ•œ ํ›„ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ฉฐ ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ์ˆ˜ํ–‰,
ํ˜‘์—…์ด ํ•„์š”ํ•  ๋•Œ ๋„คํŠธ์›Œํฌ ์„œ๋ฒ„๋ฅผ ์ด์šฉ
Check-in
(Commit)
Check-out
pullโ€จ
(clone) push
์žฅ์ :
๋„คํŠธ์›Œํฌ์˜ ์„œ๋ฒ„์— ์žฅ์• ๊ฐ€ ๋ฐœ์ƒํ•ด
๋„ ๊ฐœ๋ณ„ ๊ฐœ๋ฐœ์ž์˜ ์ž‘์—…์„ ๋กœ์ปฌ ์ปด
ํ“จํ„ฐ์—์„œ ์ง„ํ–‰ ๊ฐ€๋Šฅ
๋‹ค์–‘ํ•œ ํ˜•ํƒœ์˜ ์›Œํฌํ”Œ๋กœ์šฐ ๊ฐ€๋Šฅ
๋‹จ์ :
๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜์—ฌ์•ผ ํ•˜
๋Š” ๊ฒฝ์šฐ ์ €์žฅ ๊ณต๊ฐ„์„ ๋งŽ์ด ์ฐจ์ง€
ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ๋งŽ์€ ๊ฒฝ์šฐ ๋‹ค์šด๋กœ๋“œํ•˜
๊ณ  ์—…๋กœ๋“œํ•˜๋Š”๋ฐ ๋งŽ์€ ์‹œ๊ฐ„ ์†Œ์š”
์˜ˆ: Git, Mecurial, Bazaar ๋“ฑ
<source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
Git - Basic
Developed as the version control system for Linux Kernel
Project (๋ฆฌ๋ˆ…์Šค ์ปค๋„ ํ”„๋กœ์ ํŠธ๋ฅผ ์œ„ํ•œ ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์œผ๋กœ ๊ฐœ๋ฐœ)
Birth year: 2005๋…„
Initial purpose (์ดˆ๊ธฐ ๋ชฉํ‘œ)
speed (๋น ๋ฅธ ์†๋„)
simple design (๋‹จ์ˆœํ•œ ๊ตฌ์กฐ)
strong support for non-linear development (thousands of parallel branches)
(๋™์‹œ ๋‹ค๋ฐœ์ ์ธ ๋ธŒ๋žœ์น˜๋ฅผ ํ†ตํ•œ ๋น„์„ ํ˜•์ ์ธ ๊ฐœ๋ฐœ)
fully distributed (์™„๋ฒฝํ•œ ๋ถ„์‚ฐ)
capable of handling large projects efficiently
(๋ฆฌ๋ˆ…์Šค ์ปค๋„ ๊ฐ™์€ ๋Œ€ํ˜• ํ”„๋กœ์ ํŠธ ํšจ์œจ์ ์ธ ์ง€์›)
Git
History
Linus Torvards
Git thinks about its data more like a stream of snapshots. (Git์€ ๋ฐ์ดํ„ฐ๋ฅผ ์Šค๋ƒ…์ƒท๋“ค
์˜ ์ŠคํŠธ๋ฆผ์œผ๋กœ ๊ณ ๋ ค)
Every time you commit, or save the state of your project in Git, it basically takes a
picture of what all your files look like at that moment and stores a reference to that
snapshot. (๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๊ฑฐ๋‚˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์ €์žฅํ•  ๋•Œ๋งˆ๋‹ค ๊ทธ ์‹œ์ ์˜ ํŒŒ์ผ์— ๋Œ€ํ•ด์„œ ์Šค๋ƒ…
์ƒท์„ ๊ตฌํ•œ ํ›„ ๊ทธ ๊ฒƒ์— ๋ ˆํผ๋Ÿฐ์Šค๋ฅผ ์ €์žฅ)
To be efficient, if files have not changed, Git doesnโ€™t store the file again, just a link
to the previous identical file it has already stored. (๋ณ€๊ฒฝ๋˜์ง€ ์•Š์€ ํŒŒ์ผ์€ ๋‹ค์‹œ ํŒŒ์ผ์„
์ €์žฅํ•˜์ง€ ์•Š๊ณ  ์ด์ „์— ์ €์ •ํ•œ ๋™์ผํ•œ ํŒŒ์ผ์„ ๋งํฌ)
Git
Basic: snapshot
<source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
Everything is check-summed before it is stored and then is referred to by
that checksum (๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ธฐ ์ „์— ์ฒดํฌ์„ฌ์„ ๊ตฌํ•˜๋ฉฐ ์ด ์ฒดํฌ์„ฌ์„ ํ†ตํ•ด ๋ฐ์ด
ํ„ฐ๋ฅผ ๊ด€๋ฆฌ)
Git uses a SHA-1 hash for this checksumming (์ฒดํฌ์„ฌ ๊ณ„์‚ฐ์€ SHA-1 ํ•ด์‹œ ์‚ฌ
์šฉ)
40-character string composed of hexadecimal characters (16์ง„์ˆ˜ ๋ฌธ์ž (0, 1,.., 9, a,b,.,,f)๋กœ ๊ตฌ
์„ฑ๋œ 40๊ฐœ์˜ ๋ฌธ์ž์—ด)
calculated based on the contents of a file or directory structure (ํŒŒ์ผ์˜ ๋‚ด์šฉ ๋˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ
์กฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ณ„์‚ฐ)
Git stores everything in its database not by file name but by the hash value
of its contents (๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ํŒŒ์ผ ์ด๋ฆ„์ด ์•„๋‹Œ ํŒŒ์ผ ์ฝ˜ํ…์ธ ์˜ ํ•ด์‹œ ๊ฐ’์„ ์ €์žฅ)
Git
Basic: checksum
hash value example
Three main sections(์„ธ๊ฐœ์˜ ์˜์—ญ)
Working directory (์ž‘์—… ๊ณต๊ฐ„): a single checkout of one version of the
project (ํ”„๋กœ์ ํŠธ์˜ ํŠน์ • ๋ฒ„์ „์˜ ํŒŒ์ผ๋“ค๋กœ ์ €์žฅ์†Œ์— ์••์ถ• ํŒŒ์ผ์„ ๊ฐ€์ ธ์™€ ์ž‘์—…์„
ํ•  ์ˆ˜์žˆ๋Š” ์žฅ์†Œ)
Staging Area (์ง‘๊ฒฐ์ง€): a file, generally contained in your repository, that
stores information about what will go into your next commit (๋‹ค์Œ ์ปค๋ฐ‹ํ• 
๊ฒƒ์— ๋Œ€ํ•ด์„œ ์ •๋ณด๋ฅผ ์ €์žฅํ•˜๊ณ  ์žˆ๋Š” ํŒŒ์ผ - ์ผ๋ฐ˜์ ์œผ๋กœ ์ €์žฅ์†Œ์— ์ €์žฅ)
Repository (์ €์žฅ์†Œ): stores the metadata and object database for your
project (ํ”„๋กœ์ ํŠธ์˜ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์™€ ๊ฐ์ฒด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์ €์žฅํ•˜๋Š” ๊ณณ)
Git
Basic: three sections / states
checkout
Working
Directory
Staging
Area
Repository
add commit
Git has three main states that your files can reside in (Git์€ ํŒŒ์ผ์„ ์„ธ
๊ฐ€์ง€์˜ ์ƒํƒœ๋กœ ๊ด€๋ฆฌ)
Committed: the data is safely stored in your local database (๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ์†Œ์— ์•ˆ์ „ํ•˜๊ฒŒ
์ €์žฅ๋œ ์ƒํƒœ)
Staged: you have marked a modified file in its current version to go into your next
commit snapshot (ํ˜„์žฌ ๋ฒ„์ „์—์„œ ์ˆ˜์ •๋œ ํŒŒ์ผ์„ ๋‹ค์Œ ๋ฒ„์ „์— ์ €์žฅํ•˜๊ธฐ ์œ„ํ•ด ํ‘œ์‹œํ•œ ์ƒํƒœ)
Modified: you have changed the file but have not committed it to your database yet
(ํŒŒ์ผ์„ ์ˆ˜์ •์„ ํ•˜์˜€์œผ๋‚˜ ์•„์ง ์ €์žฅ์†Œ์— ์ €์žฅ์†Œ์— ์ €์žฅ๋˜์ง€ ์•Š์€ ์ƒํƒœ)
Git
Basic: three sections / states
(committed state)
(staged state)(modified state)
<source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
1. modify files in your working directory (์›Œํ‚น ๋””๋ ‰ํ† ๋ฆฌ์—์„œ ํŒŒ์ผ์„
์ˆ˜์ •)
2. stage the files, adding snapshots of them to your staging area
(staging ์˜์—ญ์— ํŒŒ์ผ์˜ ์Šค๋ƒ…์ƒท์„ ์ƒ์„ฑํ•˜์—ฌ ์ถ”๊ฐ€)
3. do a commit (staging ์˜์—ญ์„ ํŒŒ์ผ์„ ์ €์žฅ์†Œ์— ์ €์žฅ)
Git
Basic: Simple Workflow
Just go to http://git-scm.com/download/win (automatic download)
Git
Install Git for Windows
go to https://git-for-windows.github.io/
Git
Install Git for Windows
Git Bash
Git GUI
Shell Integration
Just doing small work
with Git
Configuration
Git Work flow
Create Repository
Git - Tutorial
Configuration
Git์€ ์„ค์น˜ ํ›„ ์‚ฌ์šฉํ™˜๊ฒฝ์„ ์„ค์ •ํ•˜๋ฉด ๋‚˜์ค‘์— Git ์‚ฌ์šฉ ์‹œ ๋ฐ˜์˜
Git์„ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•˜์—ฌ๋„ ์„ค์ • ๋‚ด์šฉ์€ ์œ ์ง€
git ๋‚ด๋ถ€ ๋ช…๋ น์–ด
$ git config ์„ ์ด์šฉํ•ด์„œ ์„ค์ • ๋‚ด์šฉ์„ ํ™•์ธ ๋˜๋Š” ๋ณ€๊ฒฝ
๊ด€๋ จ ์„ค์ • ํŒŒ์ผ
/etc/gitconfig ํŒŒ์ผ: ์‹œ์Šคํ…œ์˜ ๋ชจ๋“  ์‚ฌ์šฉ์ž์™€ ๋ชจ๋“  ์ €์žฅ์†Œ์— ์ ์šฉ๋˜๋Š” ์„ค์ •
$ git config --system ์˜ต์…˜์œผ๋กœ ์ด ํŒŒ์ผ์„ ์ˆ˜์ •
~/.gitconfig, ~/.config/git/config ํŒŒ์ผ: ํŠน์ • ์‚ฌ์šฉ์ž์—๊ฒŒ๋งŒ ์ ์šฉ๋˜๋Š” ์„ค์ •
$ git config --global ์˜ต์…˜์œผ๋กœ ์ด ํŒŒ์ผ์„ ์ˆ˜์ •
.git/config ํŒŒ์ผ: Git ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๊ณ  ํŠน์ • ์ €์žฅ์†Œ(ํ˜น์€ ํ˜„์žฌ ์ž‘์—… ์ค‘์ธ ํ”„๋กœ์ ํŠธ)์—๋งŒ ์ ์šฉ
$ git config --local ์˜ต์…˜์œผ๋กœ ์ด ํŒŒ์ผ์„ ์ˆ˜์ •
์ ์šฉ ์ˆœ์„œ: ํ”„๋กœ์ ํŠธ -> ์‚ฌ์šฉ์ž -> ์‹œ์Šคํ…œ์˜ ์ˆœ์œผ๋กœ ์ ์šฉ
Windows ์—์„œ๋Š” $HOME ๋””๋ ‰ํ† ๋ฆฌ (์•„๋งˆ๋„ C:Users$USER ๋””๋ ‰ํ† ๋ฆฌ)์— .gitconfig ํŒŒ์ผ
Git - Tutorial
Configuration
$ git config user.name โ€œGeun-Hyung Kimโ€
$ git config user.email geunkimkorea@gmail.com
$ git help config
config (git ๋‚ด๋ถ€ ๋ช…๋ น์–ด) ์— ๋Œ€ํ•œ ์„ค๋ช… ์š”์ฒญ
$ git config user.name โ€œGeun-Hyung Kimโ€
$ git config user.email geunkimkorea@gmail.com
$ git help config
config (git ๋‚ด๋ถ€ ๋ช…๋ น์–ด) ์— ๋Œ€ํ•œ ์„ค๋ช… ์š”์ฒญ
โ€ฆ
Git - Tutorial
Create Repository
$git init:
ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด
gitstore๋ผ๋Š” ์ƒˆ๋กœ์šด ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ
์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด
gitstore ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™
ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ geunkim ๋ฐ‘์˜ gitstore ๋””๋ ‰ํ† ๋ฆฌ์ž„์„ ๋‚˜ํƒ€๋ƒ„
ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ์˜ ๋‚ด์šฉ์„ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด
git ์ €์žฅ์†Œ (.git ํ•˜์œ„ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ)
๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ๋ช…๋ น์–ด
~/gitstore/.git ์ €์žฅ์†Œ๋ฅผ ์ดˆ๊ธฐํ™”
git metadata๋ฅผ ์ €์žฅํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ
.git ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ค๊ณ  ์ €์žฅ์†Œ์— ๊ด€๋ จํ•œ metadata๋ฅผ ์ €์žฅ. ์ด .git ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์žˆ๋Š”
working directory์—์„œ git ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ƒํ™ฉ์ด ๋จ
Q) ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ์— ์ฐธ์—ฌํ•˜๊ฑฐ๋‚˜ Git ์ €์žฅ์†Œ๋ฅผ ๋ณต์‚ฌํ•ด ์˜ค๊ณ  ์‹ถ์„ ๋•Œ๋Š” ?
Windows ์—์„œ๋Š” cd๋ฅผ ์‚ฌ์šฉ
Git - Tutorial
Working Directory์—์„œ ์ž‘์—…
working directory ๋‚ด ํŒŒ์ผ ์ƒํƒœ ํ™•์ธ
$ git status:working directory์™€ repository์˜ ์ƒํƒœ๋ฅผ ์ฒดํฌ, ์–ด๋–ค ํŒŒ์ผ์ด working directory
์— ์žˆ๋Š”์ง€, commit์ด ํ•„์š”ํ•œ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์žˆ๋Š”์ง€ ๋“ฑ์„ ํ™•์ธ
working directory์˜ tracked์™€ untracked๋กœ ๋‚˜๋‰จ
untracked file ์€ ์•„์ง git ๊ด€๋ฆฌ ๋Œ€์ƒ์ด ์•„๋‹Œ ํŒŒ์ผ
tracked file์€ git์— ์˜ํ•ด์„œ ๊ด€๋ฆฌ๋˜๋Š” ํŒŒ์ผ (์ด๋ฏธ ์ €์žฅ์†Œ๋‚˜ staging area์— ์žˆ๋Š” ํŒŒ์ผ)
create README.txt file
add the file to staging area
commit changes
modified README.txt and create new LICENSE
add both files to stage area
commit changes
Git - Tutorial
Git Workflow
Git - Tutorial
Git Workflow: create README.txt
vi ํŽธ์ง‘๊ธฐ๋ฅผ ์ด์šฉํ•˜์—ฌ
README.txt ํŒŒ์ผ ์ƒ์„ฑ
ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์šฉ ํ™•์ธ
์ตœ๊ทผ commit ์ดํ›„๋กœ ๋ณ€๊ฒฝ์‚ฌํ•ญ ํ™•์ธ
๊ด€๋ฆฌ๋˜์ง€์•Š๋Š” ํŒŒ์ผ ๋ชฉ๋ก
commitํ•˜๊ธฐ ์œ„ํ•ด ์ถ”๊ฐ€๋œ ๊ฒƒ์€ ์—†์œผ๋‚˜ untracked file์ด ์กด์žฌํ•œ๋‹ค
์ƒˆ๋กญ๊ฒŒ ์ƒ์„ฑ๋œ ํŒŒ์ผ
Git - Tutorial
Git Workflow: add file to staging area
README.txt ํŒŒ์ผ์„
staging area์— add
commit ๋  ํŒŒ์ผ ๋ชฉ๋ก
staging area์— ์žˆ๋Š” ํŒŒ์ผ
Git - Tutorial
Git Workflow: commit changes
staging area์˜ ํŒŒ์ผ์„ ์ €์žฅ์†Œ์— ์ €์žฅ
์ด ํŒŒ์ผ์— ๋Œ€ํ•ด์„œ ๋ฌด์—‡์„ ํ•˜์˜€๋Š”์ง€
๊ฐ„๋‹จํ•œcomment ๋‚ด์šฉversion control master
staging area์™€ working directory ํŒŒ์ผ ์—†์Œ
Git - Tutorial
Git Workflow: modifies README.txt adds LICENSE
README.txt ํŒŒ์ผ ์ˆ˜์ •
LICENSE ํŒŒ์ผ ์ƒˆ๋กญ๊ฒŒ ์ƒ์„ฑ
master branch ์—์„œ
tracked file ์ค‘ ์ˆ˜์ •์ด ๋œ ํŒŒ์ผ
untracked file
Git - Tutorial
Git Workflow: add files to staging area
์ˆ˜์ • ํŒŒ์ผ/์ƒˆ ํŒŒ์ผ ๋ชจ๋‘ ์ถ”๊ฐ€
$ git add README.txt LICENSE ์™€ ๋™์ผ
Git - Tutorial
Git Workflow: commit changes
Git - Tutorial
Git TimeLine History
$git log: ์ €์žฅ์†Œ์˜ commit ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ์‹œ๊ฐ„ ์ˆœ์œผ๋กœ ๋ณด์—ฌ์คŒ,
๊ฐ€์žฅ ์ตœ๊ทผ์— commitํ•œ ๊ฒƒ์ด ๊ฐ€์žฅ ๋จผ์ € ์ถœ๋ ฅ
master
To discard changes in working directory [working directory
์—์„œ ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ๋ฌด์‹œ(์‚ญ์ œ) ํ•˜๋ ค๋ฉด
Git - Tutorial
check out
$ git checkout -- <fileName>
Git - TutorialWeb Programming - Workflow
4 ๊ฐœ ํŒŒ์ผ์„ ์ž‘์„ฑํ•œ ํ›„ git status ํ•œ ๊ฒฐ๊ณผ ํ™”๋ฉด
4 ๊ฐœ ํŒŒ์ผ์„ staging area๋กœ ์ถ”๊ฐ€ํ•œ ๊ฒฐ๊ณผ
Git - TutorialWeb Programming - Workflow
4 ๊ฐœ ํŒŒ์ผ์„ repository์— ์ €๊ฐ•ํ•œ ์ƒํƒœ
repository ์ƒํƒœ ์ฒดํฌ
Just doing small work with
Remote Storage
(GitHub)
What is GitHub ?
Create a Repository
Create a Branch
Make and Commit Changes
Open a Pull Request
Merge a Pull Request
GitHub - Tutorial
< source: https://guides.github.com/activities/hello-world/ >
a code hosting platform for version control and collaboration
(๋ฒ„์ „ ๊ด€๋ฆฌ์™€ ํ˜‘์—…์„ ์œ„ํ•œ ํŒŒ์ผ(code) ํ˜ธ์ŠคํŒ… ํ”Œ๋žซํผ)
It lets you and others work together on project from anywhere
(์–ด๋””์—์„œ๋Š” ํ”„๋กœ์ ํŠธ์— ํ˜‘์—…์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ํ•จ)
GitHub - Tutorial
What is GitHub?
master
GitHub
(Remte Repository)
push
pull
pull
< source: https://guides.github.com/activities/hello-world/ >
1. ์˜ค๋ฅธ์ชฝ ์œ„์˜ + ๋ฉ”๋‰ด๋ฅผ ์„ ํƒํ•œ ํ›„ โ€œNew repositoryโ€ ๋ฅผ ์„ ํƒ
2. ์ €์žฅ์†Œ ์ด๋ฆ„์„ hello-world ๋กœ ์ •ํ•œ๋‹ค.
3. ์งง์€ ์„ค๋ช…์„ ์ž‘์„ฑ
4. โ€œInitialize this repository with a READMEโ€ ๋ฅผ ์„ ํƒ
5. Create repository๋ฅผ ํด๋ฆญ
GitHub - Tutorial
Create Repository
repository ์ƒ์„ฑ์„ ๋ฉ”๋‰ด
< source: https://guides.github.com/activities/hello-world/ >
GitHub - Tutorial
Create Repository
< source: https://guides.github.com/activities/hello-world/ >
1. ์‚ญ์ œํ•˜๋ ค๋Š” ์ €์žฅ์†Œ๋ฅผ ์„ ํƒ
2. (์„ค์ •) ํƒญ์„ ์„ ํƒ
3. ํ™”๋ฉด์˜ ์•„๋ž˜์— ์žˆ๋Š” ๋ฒ„ํŠผ์„ ํด๋ฆญ
4. ์‚ญ์ œํ•  ์ €์žฅ์†Œ ์ด๋ฆ„์„ ์ž…๋ ฅ ํ›„ ์‚ญ์ œ
GitHub - Tutorial
Delete Repository
GitHub - Tutorial
Create a Branch
Branching: ์ €์žฅ์†Œ์˜ ๋‹ค๋ฅธ ๋ฒ„์ „์—์„œ ์ž‘์—…์„ ํ•˜๋Š” ๋ฐฉ๋ฒ•
๊ธฐ๋ณธ์ ์œผ๋กœ ์ €์žฅ์†Œ๋Š” ์ตœ์ข… ๋ฒ„์ „(์ตœ์ข… branch)์ธ master๋ผ๋Š” ํ•˜๋‚˜์˜ branch๋ฅผ ๊ฐ€์ง
master์— commitํ•˜๊ธฐ ์ „์— ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๊ธฐ ์œ„ํ•ด ์—ฌ๋Ÿฌ branch๋ฅผ ์‚ฌ์šฉ
master์—์„œ branch๋ฅผ ์ƒ์„ฑํ•˜๋ฉด ๊ทธ ์‹œ์ ์˜ master ๋ณต์‚ฌ ๋˜๋Š” ์Šค๋ƒ…์ƒท์„ ์ƒ์„ฑ
โ€˜masterโ€™ branch
Create โ€˜featureโ€™ branch from โ€˜masterโ€™ Merge โ€˜featureโ€™ branch into โ€˜masterโ€™
Commit changes Submit Pull Request Discuss proposed changes
< source: https://guides.github.com/activities/hello-world/ >
1. ์ƒˆ๋กœ์šด hello-world ์ €์žฅ์†Œ๋ฅผ ์„ ํƒ
2. โ€œbranch: masterโ€ ๋ผ๋Š” ํŒŒ์ผ ๋ชฉ๋ก์˜ ์œ„์—์„œ drop down์„ ํด๋ฆญ
3. ์ƒˆ๋กœ์šด branch text box์— branch ์ด๋ฆ„์„ readme-edits๋กœ ์ž…๋ ฅ
4. ํŒŒ๋ž€์ƒ‰์˜ Creat branch box๋ฅผ ์„ ํƒํ•˜๊ณ  โ€œreturnโ€ ํ‚ค ์ž…๋ ฅ
GitHub - Tutorial
Create a Branch
< source: https://guides.github.com/activities/hello-world/ >
GitHub - Tutorial
Create a Branch
branch ๋ชฉ๋ก
ํ˜„์žฌ branch
์ฃผ branch
readme-edit branch ์—์„œ README.md ํŒŒ์ผ์„ ํด๋ฆญ
ํŒŒ์ผ ์ˆ˜์ •์„ ์œ„ํ•ด file view์˜ ์˜ค๋ฅธ์ชฝ ์ƒ๋‹จ์˜ ์—ฐํ•„ icon์„ ํด๋ฆญ
editor์—์„œ ๋‚ด์šฉ์„ ์ˆ˜์ •
๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ์„ค๋ช…ํ•  commit message๋ฅผ ์ž‘์„ฑ
Commit changes ๋ฒ„ํŠผ์„ ํด๋ฆญ
GitHub - Tutorial
Make and commit changes
< source: https://guides.github.com/activities/hello-world/ >
Pull Requests: GitHub์˜ ํ˜‘์—…์˜ ํ•ต์‹ฌ
Pull request๋Š” ๊ฐœ์ธ์ ์œผ๋กœ ๋ณ€๊ฒฝํ•œ ๋‚ด์šฉ์„ ํ˜‘์—…์ž๋“ค์—๊ฒŒ ์•Œ๋ ค ๋ฆฌ๋ทฐ
๋ฅผ ์š”์ฒญํ•˜๊ณ  ํ˜‘์—…์ž๋“ค์˜ branch์— mergeํ•  ๊ฒƒ์„ ์š”์ฒญ
Pull request๋Š” branch๋“ค ๊ฐ„์˜ ์ฐจ์ด์ ์„ ๋‚˜ํƒ€๋ƒ„ (์ถ”๊ฐ€๋œ ๊ฒƒ: ๋…น์ƒ‰,
์‚ญ์ œํ•œ ๊ฒƒ: ๋นจ๊ฐ„์ƒ‰)
commitํ•œ ํ›„ ์ฝ”๋“œ ๊ฐœ๋ฐœ์ด ์ข…๋ฃŒ๋˜์ง€ ์ „์— pull request๋ฅผ openํ•˜
์—ฌ ๋…ผ์˜ ์‹œ์ž‘ ๊ฐ€๋Šฅ
GitHub - Tutorial
Open a Pull Request
< source: https://guides.github.com/activities/hello-world/ >
1. Pull requests tab์„ ํด๋ฆญํ•œ ํ›„ ๋…น์ƒ‰์˜ New pull request ๋ฒ„ํŠผ์„ ํด๋ฆญ
GitHub - Tutorial
Open a Pull Request
2. master branch์™€ ๋น„๊ตํ•  branch (readme-edits)๋ฅผ ์„ ํƒ
< source: https://guides.github.com/activities/hello-world/ >
3. ์ˆ˜์ • ์‚ฌํ•ญ๊ณผ master์™€์˜ ์ฐจ์ด๋ฅผ ๋ณด๋ฉด์„œ ์ตœ์ข… ์ œ์ถœ ์—ฌ๋ถ€ ํ™•์ธ
GitHub - Tutorial
Open a Pull Request
< source: https://guides.github.com/activities/hello-world/ >
4. ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋ฌธ์ œ๊ฐ€ ์—†์œผ๋ฉด Create Pull Request ๋ฒ„ํŠผ์„ ํด๋ฆญ
GitHub - Tutorial
5. ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋Œ€ํ•œ ์„ค๋ช… ์ œ๋ชฉ๊ณผ ๊ฐ„๋‹จํ•œ ์„ค๋ช…์„ ๋‚จ๊ธฐ๊ณ  Create Pull
request! ๋ฒ„ํŠผ ํด๋ฆญ
Open a Pull Request
< source: https://guides.github.com/activities/hello-world/ >
GitHub - Tutorial
Merge a Pull Request
readme-edits branch๋ฅผ master branch์— ํ•จ๊ป˜ mergeํ•˜๋Š” ๋‹จ๊ณ„
1. ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ master์— ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด์„œ Merge pull request ๋ฒ„ํŠผ์„ ํด๋ฆญ
2. Confirm merge ํด๋ฆญ
3. ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์ถ”๊ฐ€ํ•˜์˜€๊ธฐ ๋–„๋ฌธ์— branch๋ฅผ ์‚ญ์ œํ•˜๊ธฐ ์œ„ํ•ด์„œ Delete
branch ๋ฒ„ํŠผ์„ ํด๋ฆญ
< source: https://guides.github.com/activities/hello-world/ >
Local repository์™€ GitHub repository ์—ฐ๊ฒฐํ•˜๊ธฐ
Local Git์— remote repository ์ถ”๊ฐ€
GitHub - Tutorial
Local and Remote Repository
$git remote add origin https://github.com/username/myproject.git
๋ณธ์ธ์˜
GitHub ์‚ฌ์šฉ์ž ์ด๋ฆ„ (id)
์—ฐ๊ฒฐํ•˜๋ ค๋Š” ์ €์žฅ์†Œ ์ด๋ฆ„
(์ด๊ฒฝ์šฐ myproject)
$git remote add [๋‹จ์ถ•์ด๋ฆ„] [url]
remote repository
์ถ”๊ฐ€
url ๋กœ ํ‘œํ˜„๋˜๋Š” remote repository ์ €์žฅ์†Œ์˜ ๋‹จ์ถ•์ด๋ฆ„
remote repository์˜ url
๋‹จ์ถ•์ด๋ฆ„์ด origin ์ž„
Local repository์™€ GitHub repository ์—ฐ๊ฒฐํ•˜๊ธฐ
GitHub - Tutorial
Local and Remote Repository
github์˜ github.com/geunhkim/WebProgramming.git์„ origin์ด๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์ถ”๊ฐ€
Local repository์— ์ถ”๊ฐ€๋œ remote repository ํ™•์ธ
$git remote
๊ฒฐ๊ณผ
Local repository์— ์ถ”๊ฐ€๋œ remote repository ์ƒ์„ธ ์ •๋ณด
GitHub - Tutorial
Local and Remote Repository
Local repository์˜ ๋‚ด์šฉ์„ Remote Repository์— upload ํ•˜๊ธฐ
Local์˜ ๋‚ด์šฉ์„ overwrite ํ•˜๊ธฐ
pushํ•  ๊ถŒํ•œ์„ ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š๋Š” ํ”„๋กœ์ ํŠธ์— ์ฐธ์—ฌํ•˜๊ณ ์ž ํ•  ๊ฒฝ์šฐ์—๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ โ€œforkโ€๋ฅผ
ํ•˜์—ฌ์•ผ ํ•จ
โ€œforkโ€ํ•˜๋ฉด GitHub์ด ํ”„๋กœ์ ํŠธ๋ฅผ ํ†ต์งธ๋กœ ์‚ฌ์šฉ์ž์˜ ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋กœ ๋ณต์‚ฌํ•˜๊ธฐ ๋–„๋ฌธ์— push๋ฅผ
ํ•  ์ˆ˜ ์žˆ์Œ
GitHub - Tutorial
Contributing to a project
์ฐธ์—ฌํ•  ํ”„๋กœ์žญํŠธ์˜ Fork button์„ ํด๋ฆญํ•˜๋ฉด ์ž์‹ ์˜ ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋กœ ๋ณต์‚ฌ๋จ
geunkim/WebProgramming์—์„œ geunhyung/WebProgramming
์œผ๋กœ fork๋œ ๋‚ด์šฉ
GitHub - Tutorial
Contributing to a project
geunhyung ๋„ค์ž„์ŠคํŽ˜์ด์Šค์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ ๋น„๊ต ํ™”๋ฉด
GitHub -Tutorial
Contributing to a project
geunkim ๋„ค์ž„์ŠคํŽ˜์ด์Šค์˜ pull request ๋œ ๊ฒฐ๊ณผ
GitHub - Tutorial
Contributing to a project
GitHub
Web Programming Repository
https://github.com/geunhkim/WebProgramming.git
References
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋Ÿผ ๋“ค์„ ์œ„ํ•œ DVCS - Git: http://
www.slideshare.net/ibare/dvcs-git
Git์„ ์ด์šฉํ•œ ํ˜‘์—… ์›Œํฌํ”Œ๋กœ์šฐ ๋ฐฐ์šฐ๊ธฐ: http://blog.appkr.kr/learn-n-think/
comparing-workflows/
Become a git guru: https://www.atlassian.com/git/tutorials
ํŠธ๋ผ๋น„์Šค ์Šค์œ„์Šค๊ตฟ, Git, ๋ถ„์‚ฐ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ, (์ธ์‚ฌ์ด๋“œ)
git โ€” everything-is-local: https://git-scm.com/doc
Pro Git book: https://git-scm.com/book/en/v2 (ํ•œ๊ธ€ ๋ฒ„์ „ ์กด์žฌ)
Giancarlo Lionetti: What is Version Control: Centralized vs. DVCS
Adding an existing project to GitHub using command line: https://
help.github.com/articles/adding-an-existing-project-to-github-using-the-
command-line/

More Related Content

PDF
Git ๊ธฐ๋ณธ๊ฐœ๋…๊ณผ ์‚ฌ์šฉ๋ฒ• ๊ทธ๋ฆฌ๊ณ  ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜
PDF
Git tutorials
PPTX
git, ์ดํ•ด๋ถ€ํ„ฐ ํ™œ์šฉ๊นŒ์ง€
PDF
Git - Level 2
PDF
[๊ธฐ์ดˆ] GIT ๊ต์œก ์ž๋ฃŒ
PDF
Git branch stregagy & case study
PDF
git-basic-commands
PPTX
Advanced git
Git ๊ธฐ๋ณธ๊ฐœ๋…๊ณผ ์‚ฌ์šฉ๋ฒ• ๊ทธ๋ฆฌ๊ณ  ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜
Git tutorials
git, ์ดํ•ด๋ถ€ํ„ฐ ํ™œ์šฉ๊นŒ์ง€
Git - Level 2
[๊ธฐ์ดˆ] GIT ๊ต์œก ์ž๋ฃŒ
Git branch stregagy & case study
git-basic-commands
Advanced git

What's hot (20)

PPTX
Git ์‚ฌ์šฉ ๊ฐ€์ด๋“œ
PDF
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
PPTX
แ„‹แ…ฉแ„‘แ…ณแ†ซแ„‰แ…ฉแ„‰แ…ณ แ„€แ…ฉแ†ผแ„’แ…ฅแ†ซแ„‹แ…ณแ†ฏ แ„‹แ…ฑแ„’แ…กแ†ซ แ„‘แ…ตแ†ฏแ„‰แ…ฎ แ„Œแ…ตแ„‰แ…ตแ†จ
PDF
แ„‡แ…ฅแ„Œแ…ฅแ†ซแ„€แ…ชแ†ซแ„…แ…ตแ„‰แ…ตแ„‰แ…ณแ„แ…ฆแ†ท แ„Œแ…ฉแ†ผแ„…แ…ฒแ„‹แ…ช แ„‰แ…ฉแ„€แ…ข
PDF
[NDC16] Effective Git
PDF
Git ๋”ํ•˜๊ธฐ GitHub(Gitํด๋ผ์ด์–ธํŠธ ํ™œ์šฉ) / Getting started with git+github
PDF
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
PDF
Git Tutorial
PDF
140109 ํŒ€ํ”„๋กœ์ ํŠธ ํ˜‘์—…ํˆด
PPTX
Gitแ„‹แ…ด แ„€แ…ขแ„‚แ…งแ†ทแ„€แ…ช แ„‰แ…กแ„‹แ…ญแ†ผ
PPTX
Git
PDF
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
PDF
Git ๋”ํ•˜๊ธฐ GitHub(๊ตฌ๋ฆ„IDE ํ™˜๊ฒฝ)
PDF
Git ๊ฐ•๋ณ„
PDF
Git ์ฝ”๋“œ๋žฉ ์Šคํ„ฐ๋”” 2
PDF
Git ์‚ฌ์šฉ๋ฒ• ๊ณต์œ  + Unity3D with git
PPTX
์ดํด๋ฆฝ์Šค๋กœ GIT ์‚ฌ์šฉํ•˜๊ธฐ
PDF
Github ์‚ฌ์šฉ๋ฒ•
PDF
Git & Github Seminar-2
PDF
2011๋…„ KTH H3 ์ปจํผ๋Ÿฐ์Šค Track B, ์„ธ์…˜4 "Advanced Git" by A.J
Git ์‚ฌ์šฉ ๊ฐ€์ด๋“œ
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
แ„‹แ…ฉแ„‘แ…ณแ†ซแ„‰แ…ฉแ„‰แ…ณ แ„€แ…ฉแ†ผแ„’แ…ฅแ†ซแ„‹แ…ณแ†ฏ แ„‹แ…ฑแ„’แ…กแ†ซ แ„‘แ…ตแ†ฏแ„‰แ…ฎ แ„Œแ…ตแ„‰แ…ตแ†จ
แ„‡แ…ฅแ„Œแ…ฅแ†ซแ„€แ…ชแ†ซแ„…แ…ตแ„‰แ…ตแ„‰แ…ณแ„แ…ฆแ†ท แ„Œแ…ฉแ†ผแ„…แ…ฒแ„‹แ…ช แ„‰แ…ฉแ„€แ…ข
[NDC16] Effective Git
Git ๋”ํ•˜๊ธฐ GitHub(Gitํด๋ผ์ด์–ธํŠธ ํ™œ์šฉ) / Getting started with git+github
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
Git Tutorial
140109 ํŒ€ํ”„๋กœ์ ํŠธ ํ˜‘์—…ํˆด
Gitแ„‹แ…ด แ„€แ…ขแ„‚แ…งแ†ทแ„€แ…ช แ„‰แ…กแ„‹แ…ญแ†ผ
Git
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
Git ๋”ํ•˜๊ธฐ GitHub(๊ตฌ๋ฆ„IDE ํ™˜๊ฒฝ)
Git ๊ฐ•๋ณ„
Git ์ฝ”๋“œ๋žฉ ์Šคํ„ฐ๋”” 2
Git ์‚ฌ์šฉ๋ฒ• ๊ณต์œ  + Unity3D with git
์ดํด๋ฆฝ์Šค๋กœ GIT ์‚ฌ์šฉํ•˜๊ธฐ
Github ์‚ฌ์šฉ๋ฒ•
Git & Github Seminar-2
2011๋…„ KTH H3 ์ปจํผ๋Ÿฐ์Šค Track B, ์„ธ์…˜4 "Advanced Git" by A.J
Ad

Similar to 11. git basic (20)

PDF
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
PDF
[17.02.09] Github introduction (Korean Version)
PPTX
Git
PPTX
Git
PPTX
Git ๊ธฐ๋ณธ
PPTX
Git ๋ถ„์‚ฐ๋ฒ„์ „๊ด€๋ฆฌ ์‹œ์Šคํ…œ(1)
PPTX
Git basic2 chaos
PDF
Git Tutorial
PDF
Git: A Motivating Introduction
PPTX
Git lecture1
PPTX
๋ฆฌ์ŠคํŽ™ํ† ๋ง ์„ธ๋ฏธ๋‚˜ - Git, Github ์•Œ์•„๋ณด๊ธฐ
PPT
Git server แ„€แ…ฎแ„Žแ…ฎแ†จ(git olite,gitweb)
PDF
PDF
Git & GitHub
PDF
Git & Github Seminar-1
PPT
Git from google techtalks by Randal
PDF
๊นƒํ—ˆ๋ธŒ ์‹œ์ž‘ํ•˜๊ธฐ
PDF
Git ์ฝ”๋“œ๋žฉ ์Šคํ„ฐ๋”” 1
PDF
[VCS] Git&GitLab_Designer
PDF
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…] Docker๋ฅผ ํ™œ์šฉํ•œ Gitlab CI/CD ๊ตฌ์„ฑ ํ…Œ์ŠคํŠธ
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
[17.02.09] Github introduction (Korean Version)
Git
Git
Git ๊ธฐ๋ณธ
Git ๋ถ„์‚ฐ๋ฒ„์ „๊ด€๋ฆฌ ์‹œ์Šคํ…œ(1)
Git basic2 chaos
Git Tutorial
Git: A Motivating Introduction
Git lecture1
๋ฆฌ์ŠคํŽ™ํ† ๋ง ์„ธ๋ฏธ๋‚˜ - Git, Github ์•Œ์•„๋ณด๊ธฐ
Git server แ„€แ…ฎแ„Žแ…ฎแ†จ(git olite,gitweb)
Git & GitHub
Git & Github Seminar-1
Git from google techtalks by Randal
๊นƒํ—ˆ๋ธŒ ์‹œ์ž‘ํ•˜๊ธฐ
Git ์ฝ”๋“œ๋žฉ ์Šคํ„ฐ๋”” 1
[VCS] Git&GitLab_Designer
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…] Docker๋ฅผ ํ™œ์šฉํ•œ Gitlab CI/CD ๊ตฌ์„ฑ ํ…Œ์ŠคํŠธ
Ad

More from Geunhyung Kim (7)

PDF
7. sorting
PDF
6. binary tree
PDF
5.node js
PDF
5. queue
PDF
4. stack
PDF
1. introduction to algorithm
PDF
3. linked list
7. sorting
6. binary tree
5.node js
5. queue
4. stack
1. introduction to algorithm
3. linked list

11. git basic

  • 1. Geun-Hyung Kim UMCL @ Dong-Eui University Introduction to Git/GitHub
  • 2. ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ Local Version Control / Central Version Control / Distributed Version Control Git - Basic Git - Tutorial : Just doing small work with Git Configuration Create Repository Git Workflow GitHub - Tutorial: Just doing small work with remote storage Create/Delete Repository Create branch Open Pull Request /Merge Pull Request ๋ชฉ ์ฐจ ๋‹ด๊ณ  ์žˆ๋Š” ๋‚ด์šฉ
  • 3. Version Control System What is Version Control? A category of software tools that help a software team manage changes to source code over time. (์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ํŒ€์ด ๊ฐœ๋ฐœ ์ค‘์— ์†Œ์Šค์ฝ”๋“œ์˜ ๋ณ€๊ฒฝ ๊ด€๋ฆฌ๋ฅผ ๋•๋Š” ์†Œํ”„ํŠธ ์›จ์–ด ๋„๊ตฌ) ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ ๋ชจ๋“  ํŒŒ์ผ ๋ณ€ํ™”๋ฅผ ์‹œ๊ฐ„์— ๋”ฐ๋ผ ๋ฒ„์ „ ๊ด€๋ฆฌ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ๊ธฐ๋กํ•œ ํ›„ ๋‚˜์ค‘์— ํŠน์ • ์‹œ์ ์˜ ๋ฒ„์ „์„ ๋‹ค์‹œ ๊บผ๋‚ด์˜ฌ ์ˆ˜ ์žˆ๋Š” ์‹œ์Šคํ…œ ๊ทธ๋ž˜ํ”ฝ ๋””์ž์ด๋„ˆ๋‚˜ ์›น ๋””์ž์ด๋„ˆ๋„ ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ(VCS - Version Control System)์„ ์‚ฌ์šฉ ๊ฐ€๋Šฅ VCS๋กœ ์ด๋ฏธ์ง€๋‚˜ ๋ ˆ์ด์•„์›ƒ์˜ ๋ฒ„์ „(๋ณ€๊ฒฝ ์ด๋ ฅ ํ˜น์€ ์ˆ˜์ • ๋‚ด์šฉ)์„ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ํ˜„๋ช…
  • 4. ๊ฐ ํŒŒ์ผ์„ ์ด์ „ ์ƒํƒœ๋กœ ๋˜๋Œ๋ฆด ์ˆ˜ ์žˆ์Œ ํ”„๋กœ์ ํŠธ ์ „์ฒด๋ฅผ ์ด์ „ ์ƒํƒœ๋กœ ๋˜๋Œ ์ˆ˜ ์žˆ์Œ ์‹œ๊ฐ„์— ๋”ฐ๋ผ ์ˆ˜์ • ๋‚ด์šฉ์„ ๋น„๊ตํ•ด ๋ณผ ์ˆ˜ ์žˆ์Œ ๋ˆ„๊ฐ€ ๋ฌธ์ œ๋ฅผ ์ผ์œผ์ผฐ๋Š”์ง€ ์ถ”์  VCS๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํŒŒ์ผ ์žƒ๊ฑฐ๋‚˜ ์ž˜๋ชป ์ˆ˜์ •๋˜์—ˆ์„ ๋•Œ ์‰ฝ๊ฒŒ ๋ณต๊ตฌ Benefits (์žฅ์ ) A complete long-term change history of every file ํŒŒ์ผ ์ƒ์„ฑ, ์‚ญ์ œ, ๋ณ€๊ฒฝ๊ณผ ๊ฐ™์€ ํŒŒ์ผ ๋ณ€๊ฒฝ์— ๋Œ€ํ•œ ์ „์ฒด ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ๊ธฐ๋กํ•˜๊ณ  ์žˆ์–ด ๊ณผ๊ฑฐ์˜ ์ž„์˜์˜ ๋ฒ„์ „์„ ์ด์šฉ ๊ฐ€๋Šฅ Branching and merging branch(๋ธŒ๋žœ์น˜) ์ƒ์„ฑ ๊ธฐ๋Šฅ์„ ์ด์šฉํ•˜์—ฌ ํŒ€์›์ด ๋…์ž์ ์ธ ๊ฐœ๋ฐœ์„ ์ˆ˜ํ–‰ ๊ฐ ๊ฐœ๋ฐœ์ž๋“ค์ด ๊ฐ ๋ธŒ๋žœ์น˜์˜ ์ˆ˜์ •์—์„œ ์„œ๋กœ ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๋Š”์ง€ ๊ฒ€์ฆ ์ˆ˜ํ–‰ ๊ฒฐ๊ณผ๋ฅผ ํ†ตํ•ฉํ•˜์—ฌ ์ตœ์ข… ๊ฐœ๋ฐœ์˜ ๋ฐฐํฌ ๋ฒ„์ „์„ ๊ฒฐ์ • Traceability ๊ฐ ๋ณ€๊ฒฝ์— ๋Œ€ํ•œ ๋ชฉ์ ๊ณผ ์˜๋„๋ฅผ ์„ค๋ช…ํ•˜๋Š” ์ฃผ์„์„ ์ ์„ ์ˆ˜ ์žˆ๋„๋ก ํ•˜์—ฌ ํŒŒ์ผ ๋ณ€๊ฒฝ์— ๋Œ€ํ•ด ์ถ”์ ์ด ๊ฐ€๋Šฅ Version Control System What can we do with VCS?
  • 5. ๊ฐ„๋‹จํ•œ ๋กœ์ปฌ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ ์ •๋ณด๋ฅผ ๊ด€๋ฆฌ RCS (Revision Control System): ํŒŒ์ผ์—์„œ ๋ณ€๊ฒฝ๋œ ๋ถ€๋ถ„ (Patch Set)์„ ํŠน ๋ณ„ํ•œ ํ˜•์‹์˜ ํŒŒ์ผ๋กœ ์ €์žฅํ•˜์—ฌ ํŒŒ์ผ์˜ ํŠน์ • ์‹œ์ ์œผ๋กœ ๋˜๋Œ๋ฆด ์ˆ˜ ์žˆ์Œ Version Control System Local Version Control Check-in Check-out <source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
  • 6. ๋‹ค๋ฅธ ๊ฐœ๋ฐœ์ž์™€ ํ•จ๊ป˜ ์ž‘์—…์„ ํ•˜๋ฉฐ ์ž‘์—…์— ๋Œ€ํ•œ ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•ด ๋„คํŠธ์›Œํฌ์— ์„œ๋ฒ„๋ฅผ ์ด์šฉํ•˜๋Š” ๋ฐฉ ๋ฒ• (์˜ˆ: CVS, Subversion, Perforce ๊ฐ™์€ ์‹œ์Šคํ…œ ) ์žฅ์ : ํ”„๋กœ์ ํŠธ์— ์ฐธ์—ฌํ•˜๋Š” ๊ฐœ๋ฐœ์ž ๋ˆ„๊ฐ€ ๋ฌด์—‡์„ ํ•˜๊ณ  ์žˆ๋Š”์ง€ ๊ด€๋ฆฌ ์šฉ์ด, ํ•˜๋‚˜์˜ VCS๋กœ ๊ด€๋ฆฌ ๊ฐ€๋Šฅ ๋‹จ์ : ์ค‘์•™์˜ ์„œ๋ฒ„๊ฐ€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ๋ฐฑ์—…์„ ํ•  ๋ฐฉ๋ฒ•์ด ์—†์Œ Version Control System Centralized VCS (CVCS) <source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics> Check-in (Commit) Check-out Check-in (Commit) Check-out
  • 7. Version Control System Distributed VCS (DVCS) ์ €์žฅ์†Œ ์ „์ฒด๋ฅผ ๋กœ์ปฌ ํ˜ธ์ŠคํŠธ๋กœ ๋ณต์‚ฌํ•œ ํ›„ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ฉฐ ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ์ˆ˜ํ–‰, ํ˜‘์—…์ด ํ•„์š”ํ•  ๋•Œ ๋„คํŠธ์›Œํฌ ์„œ๋ฒ„๋ฅผ ์ด์šฉ Check-in (Commit) Check-out pullโ€จ (clone) push ์žฅ์ : ๋„คํŠธ์›Œํฌ์˜ ์„œ๋ฒ„์— ์žฅ์• ๊ฐ€ ๋ฐœ์ƒํ•ด ๋„ ๊ฐœ๋ณ„ ๊ฐœ๋ฐœ์ž์˜ ์ž‘์—…์„ ๋กœ์ปฌ ์ปด ํ“จํ„ฐ์—์„œ ์ง„ํ–‰ ๊ฐ€๋Šฅ ๋‹ค์–‘ํ•œ ํ˜•ํƒœ์˜ ์›Œํฌํ”Œ๋กœ์šฐ ๊ฐ€๋Šฅ ๋‹จ์ : ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜์—ฌ์•ผ ํ•˜ ๋Š” ๊ฒฝ์šฐ ์ €์žฅ ๊ณต๊ฐ„์„ ๋งŽ์ด ์ฐจ์ง€ ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ๋งŽ์€ ๊ฒฝ์šฐ ๋‹ค์šด๋กœ๋“œํ•˜ ๊ณ  ์—…๋กœ๋“œํ•˜๋Š”๋ฐ ๋งŽ์€ ์‹œ๊ฐ„ ์†Œ์š” ์˜ˆ: Git, Mecurial, Bazaar ๋“ฑ <source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
  • 9. Developed as the version control system for Linux Kernel Project (๋ฆฌ๋ˆ…์Šค ์ปค๋„ ํ”„๋กœ์ ํŠธ๋ฅผ ์œ„ํ•œ ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์œผ๋กœ ๊ฐœ๋ฐœ) Birth year: 2005๋…„ Initial purpose (์ดˆ๊ธฐ ๋ชฉํ‘œ) speed (๋น ๋ฅธ ์†๋„) simple design (๋‹จ์ˆœํ•œ ๊ตฌ์กฐ) strong support for non-linear development (thousands of parallel branches) (๋™์‹œ ๋‹ค๋ฐœ์ ์ธ ๋ธŒ๋žœ์น˜๋ฅผ ํ†ตํ•œ ๋น„์„ ํ˜•์ ์ธ ๊ฐœ๋ฐœ) fully distributed (์™„๋ฒฝํ•œ ๋ถ„์‚ฐ) capable of handling large projects efficiently (๋ฆฌ๋ˆ…์Šค ์ปค๋„ ๊ฐ™์€ ๋Œ€ํ˜• ํ”„๋กœ์ ํŠธ ํšจ์œจ์ ์ธ ์ง€์›) Git History Linus Torvards
  • 10. Git thinks about its data more like a stream of snapshots. (Git์€ ๋ฐ์ดํ„ฐ๋ฅผ ์Šค๋ƒ…์ƒท๋“ค ์˜ ์ŠคํŠธ๋ฆผ์œผ๋กœ ๊ณ ๋ ค) Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. (๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๊ฑฐ๋‚˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์ €์žฅํ•  ๋•Œ๋งˆ๋‹ค ๊ทธ ์‹œ์ ์˜ ํŒŒ์ผ์— ๋Œ€ํ•ด์„œ ์Šค๋ƒ… ์ƒท์„ ๊ตฌํ•œ ํ›„ ๊ทธ ๊ฒƒ์— ๋ ˆํผ๋Ÿฐ์Šค๋ฅผ ์ €์žฅ) To be efficient, if files have not changed, Git doesnโ€™t store the file again, just a link to the previous identical file it has already stored. (๋ณ€๊ฒฝ๋˜์ง€ ์•Š์€ ํŒŒ์ผ์€ ๋‹ค์‹œ ํŒŒ์ผ์„ ์ €์žฅํ•˜์ง€ ์•Š๊ณ  ์ด์ „์— ์ €์ •ํ•œ ๋™์ผํ•œ ํŒŒ์ผ์„ ๋งํฌ) Git Basic: snapshot <source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
  • 11. Everything is check-summed before it is stored and then is referred to by that checksum (๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ธฐ ์ „์— ์ฒดํฌ์„ฌ์„ ๊ตฌํ•˜๋ฉฐ ์ด ์ฒดํฌ์„ฌ์„ ํ†ตํ•ด ๋ฐ์ด ํ„ฐ๋ฅผ ๊ด€๋ฆฌ) Git uses a SHA-1 hash for this checksumming (์ฒดํฌ์„ฌ ๊ณ„์‚ฐ์€ SHA-1 ํ•ด์‹œ ์‚ฌ ์šฉ) 40-character string composed of hexadecimal characters (16์ง„์ˆ˜ ๋ฌธ์ž (0, 1,.., 9, a,b,.,,f)๋กœ ๊ตฌ ์„ฑ๋œ 40๊ฐœ์˜ ๋ฌธ์ž์—ด) calculated based on the contents of a file or directory structure (ํŒŒ์ผ์˜ ๋‚ด์šฉ ๋˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ ์กฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ณ„์‚ฐ) Git stores everything in its database not by file name but by the hash value of its contents (๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ํŒŒ์ผ ์ด๋ฆ„์ด ์•„๋‹Œ ํŒŒ์ผ ์ฝ˜ํ…์ธ ์˜ ํ•ด์‹œ ๊ฐ’์„ ์ €์žฅ) Git Basic: checksum hash value example
  • 12. Three main sections(์„ธ๊ฐœ์˜ ์˜์—ญ) Working directory (์ž‘์—… ๊ณต๊ฐ„): a single checkout of one version of the project (ํ”„๋กœ์ ํŠธ์˜ ํŠน์ • ๋ฒ„์ „์˜ ํŒŒ์ผ๋“ค๋กœ ์ €์žฅ์†Œ์— ์••์ถ• ํŒŒ์ผ์„ ๊ฐ€์ ธ์™€ ์ž‘์—…์„ ํ•  ์ˆ˜์žˆ๋Š” ์žฅ์†Œ) Staging Area (์ง‘๊ฒฐ์ง€): a file, generally contained in your repository, that stores information about what will go into your next commit (๋‹ค์Œ ์ปค๋ฐ‹ํ•  ๊ฒƒ์— ๋Œ€ํ•ด์„œ ์ •๋ณด๋ฅผ ์ €์žฅํ•˜๊ณ  ์žˆ๋Š” ํŒŒ์ผ - ์ผ๋ฐ˜์ ์œผ๋กœ ์ €์žฅ์†Œ์— ์ €์žฅ) Repository (์ €์žฅ์†Œ): stores the metadata and object database for your project (ํ”„๋กœ์ ํŠธ์˜ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์™€ ๊ฐ์ฒด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์ €์žฅํ•˜๋Š” ๊ณณ) Git Basic: three sections / states checkout Working Directory Staging Area Repository add commit
  • 13. Git has three main states that your files can reside in (Git์€ ํŒŒ์ผ์„ ์„ธ ๊ฐ€์ง€์˜ ์ƒํƒœ๋กœ ๊ด€๋ฆฌ) Committed: the data is safely stored in your local database (๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ์†Œ์— ์•ˆ์ „ํ•˜๊ฒŒ ์ €์žฅ๋œ ์ƒํƒœ) Staged: you have marked a modified file in its current version to go into your next commit snapshot (ํ˜„์žฌ ๋ฒ„์ „์—์„œ ์ˆ˜์ •๋œ ํŒŒ์ผ์„ ๋‹ค์Œ ๋ฒ„์ „์— ์ €์žฅํ•˜๊ธฐ ์œ„ํ•ด ํ‘œ์‹œํ•œ ์ƒํƒœ) Modified: you have changed the file but have not committed it to your database yet (ํŒŒ์ผ์„ ์ˆ˜์ •์„ ํ•˜์˜€์œผ๋‚˜ ์•„์ง ์ €์žฅ์†Œ์— ์ €์žฅ์†Œ์— ์ €์žฅ๋˜์ง€ ์•Š์€ ์ƒํƒœ) Git Basic: three sections / states (committed state) (staged state)(modified state) <source: https://git-scm.com/book/en/v2/Getting-Started-Git-Basics>
  • 14. 1. modify files in your working directory (์›Œํ‚น ๋””๋ ‰ํ† ๋ฆฌ์—์„œ ํŒŒ์ผ์„ ์ˆ˜์ •) 2. stage the files, adding snapshots of them to your staging area (staging ์˜์—ญ์— ํŒŒ์ผ์˜ ์Šค๋ƒ…์ƒท์„ ์ƒ์„ฑํ•˜์—ฌ ์ถ”๊ฐ€) 3. do a commit (staging ์˜์—ญ์„ ํŒŒ์ผ์„ ์ €์žฅ์†Œ์— ์ €์žฅ) Git Basic: Simple Workflow
  • 15. Just go to http://git-scm.com/download/win (automatic download) Git Install Git for Windows go to https://git-for-windows.github.io/
  • 16. Git Install Git for Windows Git Bash Git GUI Shell Integration
  • 17. Just doing small work with Git Configuration Git Work flow Create Repository
  • 18. Git - Tutorial Configuration Git์€ ์„ค์น˜ ํ›„ ์‚ฌ์šฉํ™˜๊ฒฝ์„ ์„ค์ •ํ•˜๋ฉด ๋‚˜์ค‘์— Git ์‚ฌ์šฉ ์‹œ ๋ฐ˜์˜ Git์„ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•˜์—ฌ๋„ ์„ค์ • ๋‚ด์šฉ์€ ์œ ์ง€ git ๋‚ด๋ถ€ ๋ช…๋ น์–ด $ git config ์„ ์ด์šฉํ•ด์„œ ์„ค์ • ๋‚ด์šฉ์„ ํ™•์ธ ๋˜๋Š” ๋ณ€๊ฒฝ ๊ด€๋ จ ์„ค์ • ํŒŒ์ผ /etc/gitconfig ํŒŒ์ผ: ์‹œ์Šคํ…œ์˜ ๋ชจ๋“  ์‚ฌ์šฉ์ž์™€ ๋ชจ๋“  ์ €์žฅ์†Œ์— ์ ์šฉ๋˜๋Š” ์„ค์ • $ git config --system ์˜ต์…˜์œผ๋กœ ์ด ํŒŒ์ผ์„ ์ˆ˜์ • ~/.gitconfig, ~/.config/git/config ํŒŒ์ผ: ํŠน์ • ์‚ฌ์šฉ์ž์—๊ฒŒ๋งŒ ์ ์šฉ๋˜๋Š” ์„ค์ • $ git config --global ์˜ต์…˜์œผ๋กœ ์ด ํŒŒ์ผ์„ ์ˆ˜์ • .git/config ํŒŒ์ผ: Git ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๊ณ  ํŠน์ • ์ €์žฅ์†Œ(ํ˜น์€ ํ˜„์žฌ ์ž‘์—… ์ค‘์ธ ํ”„๋กœ์ ํŠธ)์—๋งŒ ์ ์šฉ $ git config --local ์˜ต์…˜์œผ๋กœ ์ด ํŒŒ์ผ์„ ์ˆ˜์ • ์ ์šฉ ์ˆœ์„œ: ํ”„๋กœ์ ํŠธ -> ์‚ฌ์šฉ์ž -> ์‹œ์Šคํ…œ์˜ ์ˆœ์œผ๋กœ ์ ์šฉ Windows ์—์„œ๋Š” $HOME ๋””๋ ‰ํ† ๋ฆฌ (์•„๋งˆ๋„ C:Users$USER ๋””๋ ‰ํ† ๋ฆฌ)์— .gitconfig ํŒŒ์ผ
  • 19. Git - Tutorial Configuration $ git config user.name โ€œGeun-Hyung Kimโ€ $ git config user.email geunkimkorea@gmail.com $ git help config config (git ๋‚ด๋ถ€ ๋ช…๋ น์–ด) ์— ๋Œ€ํ•œ ์„ค๋ช… ์š”์ฒญ $ git config user.name โ€œGeun-Hyung Kimโ€ $ git config user.email geunkimkorea@gmail.com $ git help config config (git ๋‚ด๋ถ€ ๋ช…๋ น์–ด) ์— ๋Œ€ํ•œ ์„ค๋ช… ์š”์ฒญ โ€ฆ
  • 20. Git - Tutorial Create Repository $git init: ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด gitstore๋ผ๋Š” ์ƒˆ๋กœ์šด ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด gitstore ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ geunkim ๋ฐ‘์˜ gitstore ๋””๋ ‰ํ† ๋ฆฌ์ž„์„ ๋‚˜ํƒ€๋ƒ„ ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ์˜ ๋‚ด์šฉ์„ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด git ์ €์žฅ์†Œ (.git ํ•˜์œ„ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ) ๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ๋ช…๋ น์–ด ~/gitstore/.git ์ €์žฅ์†Œ๋ฅผ ์ดˆ๊ธฐํ™” git metadata๋ฅผ ์ €์žฅํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ .git ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ค๊ณ  ์ €์žฅ์†Œ์— ๊ด€๋ จํ•œ metadata๋ฅผ ์ €์žฅ. ์ด .git ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์žˆ๋Š” working directory์—์„œ git ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ƒํ™ฉ์ด ๋จ Q) ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ์— ์ฐธ์—ฌํ•˜๊ฑฐ๋‚˜ Git ์ €์žฅ์†Œ๋ฅผ ๋ณต์‚ฌํ•ด ์˜ค๊ณ  ์‹ถ์„ ๋•Œ๋Š” ? Windows ์—์„œ๋Š” cd๋ฅผ ์‚ฌ์šฉ
  • 21. Git - Tutorial Working Directory์—์„œ ์ž‘์—… working directory ๋‚ด ํŒŒ์ผ ์ƒํƒœ ํ™•์ธ $ git status:working directory์™€ repository์˜ ์ƒํƒœ๋ฅผ ์ฒดํฌ, ์–ด๋–ค ํŒŒ์ผ์ด working directory ์— ์žˆ๋Š”์ง€, commit์ด ํ•„์š”ํ•œ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์žˆ๋Š”์ง€ ๋“ฑ์„ ํ™•์ธ working directory์˜ tracked์™€ untracked๋กœ ๋‚˜๋‰จ untracked file ์€ ์•„์ง git ๊ด€๋ฆฌ ๋Œ€์ƒ์ด ์•„๋‹Œ ํŒŒ์ผ tracked file์€ git์— ์˜ํ•ด์„œ ๊ด€๋ฆฌ๋˜๋Š” ํŒŒ์ผ (์ด๋ฏธ ์ €์žฅ์†Œ๋‚˜ staging area์— ์žˆ๋Š” ํŒŒ์ผ)
  • 22. create README.txt file add the file to staging area commit changes modified README.txt and create new LICENSE add both files to stage area commit changes Git - Tutorial Git Workflow
  • 23. Git - Tutorial Git Workflow: create README.txt vi ํŽธ์ง‘๊ธฐ๋ฅผ ์ด์šฉํ•˜์—ฌ README.txt ํŒŒ์ผ ์ƒ์„ฑ ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์šฉ ํ™•์ธ ์ตœ๊ทผ commit ์ดํ›„๋กœ ๋ณ€๊ฒฝ์‚ฌํ•ญ ํ™•์ธ ๊ด€๋ฆฌ๋˜์ง€์•Š๋Š” ํŒŒ์ผ ๋ชฉ๋ก commitํ•˜๊ธฐ ์œ„ํ•ด ์ถ”๊ฐ€๋œ ๊ฒƒ์€ ์—†์œผ๋‚˜ untracked file์ด ์กด์žฌํ•œ๋‹ค ์ƒˆ๋กญ๊ฒŒ ์ƒ์„ฑ๋œ ํŒŒ์ผ
  • 24. Git - Tutorial Git Workflow: add file to staging area README.txt ํŒŒ์ผ์„ staging area์— add commit ๋  ํŒŒ์ผ ๋ชฉ๋ก staging area์— ์žˆ๋Š” ํŒŒ์ผ
  • 25. Git - Tutorial Git Workflow: commit changes staging area์˜ ํŒŒ์ผ์„ ์ €์žฅ์†Œ์— ์ €์žฅ ์ด ํŒŒ์ผ์— ๋Œ€ํ•ด์„œ ๋ฌด์—‡์„ ํ•˜์˜€๋Š”์ง€ ๊ฐ„๋‹จํ•œcomment ๋‚ด์šฉversion control master staging area์™€ working directory ํŒŒ์ผ ์—†์Œ
  • 26. Git - Tutorial Git Workflow: modifies README.txt adds LICENSE README.txt ํŒŒ์ผ ์ˆ˜์ • LICENSE ํŒŒ์ผ ์ƒˆ๋กญ๊ฒŒ ์ƒ์„ฑ master branch ์—์„œ tracked file ์ค‘ ์ˆ˜์ •์ด ๋œ ํŒŒ์ผ untracked file
  • 27. Git - Tutorial Git Workflow: add files to staging area ์ˆ˜์ • ํŒŒ์ผ/์ƒˆ ํŒŒ์ผ ๋ชจ๋‘ ์ถ”๊ฐ€ $ git add README.txt LICENSE ์™€ ๋™์ผ
  • 28. Git - Tutorial Git Workflow: commit changes
  • 29. Git - Tutorial Git TimeLine History $git log: ์ €์žฅ์†Œ์˜ commit ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ์‹œ๊ฐ„ ์ˆœ์œผ๋กœ ๋ณด์—ฌ์คŒ, ๊ฐ€์žฅ ์ตœ๊ทผ์— commitํ•œ ๊ฒƒ์ด ๊ฐ€์žฅ ๋จผ์ € ์ถœ๋ ฅ master
  • 30. To discard changes in working directory [working directory ์—์„œ ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ๋ฌด์‹œ(์‚ญ์ œ) ํ•˜๋ ค๋ฉด Git - Tutorial check out $ git checkout -- <fileName>
  • 31. Git - TutorialWeb Programming - Workflow 4 ๊ฐœ ํŒŒ์ผ์„ ์ž‘์„ฑํ•œ ํ›„ git status ํ•œ ๊ฒฐ๊ณผ ํ™”๋ฉด 4 ๊ฐœ ํŒŒ์ผ์„ staging area๋กœ ์ถ”๊ฐ€ํ•œ ๊ฒฐ๊ณผ
  • 32. Git - TutorialWeb Programming - Workflow 4 ๊ฐœ ํŒŒ์ผ์„ repository์— ์ €๊ฐ•ํ•œ ์ƒํƒœ repository ์ƒํƒœ ์ฒดํฌ
  • 33. Just doing small work with Remote Storage (GitHub)
  • 34. What is GitHub ? Create a Repository Create a Branch Make and Commit Changes Open a Pull Request Merge a Pull Request GitHub - Tutorial < source: https://guides.github.com/activities/hello-world/ >
  • 35. a code hosting platform for version control and collaboration (๋ฒ„์ „ ๊ด€๋ฆฌ์™€ ํ˜‘์—…์„ ์œ„ํ•œ ํŒŒ์ผ(code) ํ˜ธ์ŠคํŒ… ํ”Œ๋žซํผ) It lets you and others work together on project from anywhere (์–ด๋””์—์„œ๋Š” ํ”„๋กœ์ ํŠธ์— ํ˜‘์—…์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ํ•จ) GitHub - Tutorial What is GitHub? master GitHub (Remte Repository) push pull pull < source: https://guides.github.com/activities/hello-world/ >
  • 36. 1. ์˜ค๋ฅธ์ชฝ ์œ„์˜ + ๋ฉ”๋‰ด๋ฅผ ์„ ํƒํ•œ ํ›„ โ€œNew repositoryโ€ ๋ฅผ ์„ ํƒ 2. ์ €์žฅ์†Œ ์ด๋ฆ„์„ hello-world ๋กœ ์ •ํ•œ๋‹ค. 3. ์งง์€ ์„ค๋ช…์„ ์ž‘์„ฑ 4. โ€œInitialize this repository with a READMEโ€ ๋ฅผ ์„ ํƒ 5. Create repository๋ฅผ ํด๋ฆญ GitHub - Tutorial Create Repository repository ์ƒ์„ฑ์„ ๋ฉ”๋‰ด < source: https://guides.github.com/activities/hello-world/ >
  • 37. GitHub - Tutorial Create Repository < source: https://guides.github.com/activities/hello-world/ >
  • 38. 1. ์‚ญ์ œํ•˜๋ ค๋Š” ์ €์žฅ์†Œ๋ฅผ ์„ ํƒ 2. (์„ค์ •) ํƒญ์„ ์„ ํƒ 3. ํ™”๋ฉด์˜ ์•„๋ž˜์— ์žˆ๋Š” ๋ฒ„ํŠผ์„ ํด๋ฆญ 4. ์‚ญ์ œํ•  ์ €์žฅ์†Œ ์ด๋ฆ„์„ ์ž…๋ ฅ ํ›„ ์‚ญ์ œ GitHub - Tutorial Delete Repository
  • 39. GitHub - Tutorial Create a Branch Branching: ์ €์žฅ์†Œ์˜ ๋‹ค๋ฅธ ๋ฒ„์ „์—์„œ ์ž‘์—…์„ ํ•˜๋Š” ๋ฐฉ๋ฒ• ๊ธฐ๋ณธ์ ์œผ๋กœ ์ €์žฅ์†Œ๋Š” ์ตœ์ข… ๋ฒ„์ „(์ตœ์ข… branch)์ธ master๋ผ๋Š” ํ•˜๋‚˜์˜ branch๋ฅผ ๊ฐ€์ง master์— commitํ•˜๊ธฐ ์ „์— ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๊ธฐ ์œ„ํ•ด ์—ฌ๋Ÿฌ branch๋ฅผ ์‚ฌ์šฉ master์—์„œ branch๋ฅผ ์ƒ์„ฑํ•˜๋ฉด ๊ทธ ์‹œ์ ์˜ master ๋ณต์‚ฌ ๋˜๋Š” ์Šค๋ƒ…์ƒท์„ ์ƒ์„ฑ โ€˜masterโ€™ branch Create โ€˜featureโ€™ branch from โ€˜masterโ€™ Merge โ€˜featureโ€™ branch into โ€˜masterโ€™ Commit changes Submit Pull Request Discuss proposed changes < source: https://guides.github.com/activities/hello-world/ >
  • 40. 1. ์ƒˆ๋กœ์šด hello-world ์ €์žฅ์†Œ๋ฅผ ์„ ํƒ 2. โ€œbranch: masterโ€ ๋ผ๋Š” ํŒŒ์ผ ๋ชฉ๋ก์˜ ์œ„์—์„œ drop down์„ ํด๋ฆญ 3. ์ƒˆ๋กœ์šด branch text box์— branch ์ด๋ฆ„์„ readme-edits๋กœ ์ž…๋ ฅ 4. ํŒŒ๋ž€์ƒ‰์˜ Creat branch box๋ฅผ ์„ ํƒํ•˜๊ณ  โ€œreturnโ€ ํ‚ค ์ž…๋ ฅ GitHub - Tutorial Create a Branch < source: https://guides.github.com/activities/hello-world/ >
  • 41. GitHub - Tutorial Create a Branch branch ๋ชฉ๋ก ํ˜„์žฌ branch ์ฃผ branch
  • 42. readme-edit branch ์—์„œ README.md ํŒŒ์ผ์„ ํด๋ฆญ ํŒŒ์ผ ์ˆ˜์ •์„ ์œ„ํ•ด file view์˜ ์˜ค๋ฅธ์ชฝ ์ƒ๋‹จ์˜ ์—ฐํ•„ icon์„ ํด๋ฆญ editor์—์„œ ๋‚ด์šฉ์„ ์ˆ˜์ • ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ์„ค๋ช…ํ•  commit message๋ฅผ ์ž‘์„ฑ Commit changes ๋ฒ„ํŠผ์„ ํด๋ฆญ GitHub - Tutorial Make and commit changes < source: https://guides.github.com/activities/hello-world/ >
  • 43. Pull Requests: GitHub์˜ ํ˜‘์—…์˜ ํ•ต์‹ฌ Pull request๋Š” ๊ฐœ์ธ์ ์œผ๋กœ ๋ณ€๊ฒฝํ•œ ๋‚ด์šฉ์„ ํ˜‘์—…์ž๋“ค์—๊ฒŒ ์•Œ๋ ค ๋ฆฌ๋ทฐ ๋ฅผ ์š”์ฒญํ•˜๊ณ  ํ˜‘์—…์ž๋“ค์˜ branch์— mergeํ•  ๊ฒƒ์„ ์š”์ฒญ Pull request๋Š” branch๋“ค ๊ฐ„์˜ ์ฐจ์ด์ ์„ ๋‚˜ํƒ€๋ƒ„ (์ถ”๊ฐ€๋œ ๊ฒƒ: ๋…น์ƒ‰, ์‚ญ์ œํ•œ ๊ฒƒ: ๋นจ๊ฐ„์ƒ‰) commitํ•œ ํ›„ ์ฝ”๋“œ ๊ฐœ๋ฐœ์ด ์ข…๋ฃŒ๋˜์ง€ ์ „์— pull request๋ฅผ openํ•˜ ์—ฌ ๋…ผ์˜ ์‹œ์ž‘ ๊ฐ€๋Šฅ GitHub - Tutorial Open a Pull Request < source: https://guides.github.com/activities/hello-world/ >
  • 44. 1. Pull requests tab์„ ํด๋ฆญํ•œ ํ›„ ๋…น์ƒ‰์˜ New pull request ๋ฒ„ํŠผ์„ ํด๋ฆญ GitHub - Tutorial Open a Pull Request 2. master branch์™€ ๋น„๊ตํ•  branch (readme-edits)๋ฅผ ์„ ํƒ < source: https://guides.github.com/activities/hello-world/ >
  • 45. 3. ์ˆ˜์ • ์‚ฌํ•ญ๊ณผ master์™€์˜ ์ฐจ์ด๋ฅผ ๋ณด๋ฉด์„œ ์ตœ์ข… ์ œ์ถœ ์—ฌ๋ถ€ ํ™•์ธ GitHub - Tutorial Open a Pull Request < source: https://guides.github.com/activities/hello-world/ >
  • 46. 4. ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋ฌธ์ œ๊ฐ€ ์—†์œผ๋ฉด Create Pull Request ๋ฒ„ํŠผ์„ ํด๋ฆญ GitHub - Tutorial 5. ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋Œ€ํ•œ ์„ค๋ช… ์ œ๋ชฉ๊ณผ ๊ฐ„๋‹จํ•œ ์„ค๋ช…์„ ๋‚จ๊ธฐ๊ณ  Create Pull request! ๋ฒ„ํŠผ ํด๋ฆญ Open a Pull Request < source: https://guides.github.com/activities/hello-world/ >
  • 47. GitHub - Tutorial Merge a Pull Request readme-edits branch๋ฅผ master branch์— ํ•จ๊ป˜ mergeํ•˜๋Š” ๋‹จ๊ณ„ 1. ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ master์— ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด์„œ Merge pull request ๋ฒ„ํŠผ์„ ํด๋ฆญ 2. Confirm merge ํด๋ฆญ 3. ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์ถ”๊ฐ€ํ•˜์˜€๊ธฐ ๋–„๋ฌธ์— branch๋ฅผ ์‚ญ์ œํ•˜๊ธฐ ์œ„ํ•ด์„œ Delete branch ๋ฒ„ํŠผ์„ ํด๋ฆญ < source: https://guides.github.com/activities/hello-world/ >
  • 48. Local repository์™€ GitHub repository ์—ฐ๊ฒฐํ•˜๊ธฐ Local Git์— remote repository ์ถ”๊ฐ€ GitHub - Tutorial Local and Remote Repository $git remote add origin https://github.com/username/myproject.git ๋ณธ์ธ์˜ GitHub ์‚ฌ์šฉ์ž ์ด๋ฆ„ (id) ์—ฐ๊ฒฐํ•˜๋ ค๋Š” ์ €์žฅ์†Œ ์ด๋ฆ„ (์ด๊ฒฝ์šฐ myproject) $git remote add [๋‹จ์ถ•์ด๋ฆ„] [url] remote repository ์ถ”๊ฐ€ url ๋กœ ํ‘œํ˜„๋˜๋Š” remote repository ์ €์žฅ์†Œ์˜ ๋‹จ์ถ•์ด๋ฆ„ remote repository์˜ url ๋‹จ์ถ•์ด๋ฆ„์ด origin ์ž„
  • 49. Local repository์™€ GitHub repository ์—ฐ๊ฒฐํ•˜๊ธฐ GitHub - Tutorial Local and Remote Repository github์˜ github.com/geunhkim/WebProgramming.git์„ origin์ด๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์ถ”๊ฐ€ Local repository์— ์ถ”๊ฐ€๋œ remote repository ํ™•์ธ $git remote ๊ฒฐ๊ณผ Local repository์— ์ถ”๊ฐ€๋œ remote repository ์ƒ์„ธ ์ •๋ณด
  • 50. GitHub - Tutorial Local and Remote Repository Local repository์˜ ๋‚ด์šฉ์„ Remote Repository์— upload ํ•˜๊ธฐ Local์˜ ๋‚ด์šฉ์„ overwrite ํ•˜๊ธฐ
  • 51. pushํ•  ๊ถŒํ•œ์„ ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š๋Š” ํ”„๋กœ์ ํŠธ์— ์ฐธ์—ฌํ•˜๊ณ ์ž ํ•  ๊ฒฝ์šฐ์—๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ โ€œforkโ€๋ฅผ ํ•˜์—ฌ์•ผ ํ•จ โ€œforkโ€ํ•˜๋ฉด GitHub์ด ํ”„๋กœ์ ํŠธ๋ฅผ ํ†ต์งธ๋กœ ์‚ฌ์šฉ์ž์˜ ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋กœ ๋ณต์‚ฌํ•˜๊ธฐ ๋–„๋ฌธ์— push๋ฅผ ํ•  ์ˆ˜ ์žˆ์Œ GitHub - Tutorial Contributing to a project ์ฐธ์—ฌํ•  ํ”„๋กœ์žญํŠธ์˜ Fork button์„ ํด๋ฆญํ•˜๋ฉด ์ž์‹ ์˜ ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋กœ ๋ณต์‚ฌ๋จ
  • 52. geunkim/WebProgramming์—์„œ geunhyung/WebProgramming ์œผ๋กœ fork๋œ ๋‚ด์šฉ GitHub - Tutorial Contributing to a project
  • 53. geunhyung ๋„ค์ž„์ŠคํŽ˜์ด์Šค์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ ๋น„๊ต ํ™”๋ฉด GitHub -Tutorial Contributing to a project
  • 54. geunkim ๋„ค์ž„์ŠคํŽ˜์ด์Šค์˜ pull request ๋œ ๊ฒฐ๊ณผ GitHub - Tutorial Contributing to a project
  • 56. References ๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋Ÿผ ๋“ค์„ ์œ„ํ•œ DVCS - Git: http:// www.slideshare.net/ibare/dvcs-git Git์„ ์ด์šฉํ•œ ํ˜‘์—… ์›Œํฌํ”Œ๋กœ์šฐ ๋ฐฐ์šฐ๊ธฐ: http://blog.appkr.kr/learn-n-think/ comparing-workflows/ Become a git guru: https://www.atlassian.com/git/tutorials ํŠธ๋ผ๋น„์Šค ์Šค์œ„์Šค๊ตฟ, Git, ๋ถ„์‚ฐ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ, (์ธ์‚ฌ์ด๋“œ) git โ€” everything-is-local: https://git-scm.com/doc Pro Git book: https://git-scm.com/book/en/v2 (ํ•œ๊ธ€ ๋ฒ„์ „ ์กด์žฌ) Giancarlo Lionetti: What is Version Control: Centralized vs. DVCS Adding an existing project to GitHub using command line: https:// help.github.com/articles/adding-an-existing-project-to-github-using-the- command-line/