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๋ก ์ด๋ฏธ์ง๋ ๋ ์ด์์์ ๋ฒ์ (๋ณ๊ฒฝ ์ด๋ ฅ ํน์ ์์ ๋ด์ฉ)์ ๊ด๋ฆฌํ๋ ๊ฒ์ด ํ๋ช
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/
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
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/ >