처음 시작하는 Git & GitHub

Contents

WHY

WHAT

HOW

Git을 사용하는 이유

Git과 GitHub

Git 활용하기

Git을 사용하는 이유

WHY

Linus Torvalds?

버전 관리 시스템을 사용하지 않는 버전 관리

  • 프로젝트
  • 프로젝트_수정
  • 프로젝트_수정2
  • 프로젝트_최종
  • 프로젝트_진짜최종
  • 프로젝트_최종_20211107
  • ...

우리 주변의 버전 관리 시스템

버전 관리 시스템의 역할

?

Git과 GitHub

WHAT

Git, 분산 버전 관리 시스템

D

V

C

S

D

V

C

S

istributed

ersion

ontrol

ystem

D

V

C

S

istributed

ersion

ontrol

ystem

D

istributed

Repository

Local

Repository

Remote

Repository

Repo

Repo

Repo

Repo

Repo

Git 활용하기

HOW

commit

'의미' 있는 변화

  1. 커밋
  2. 커밋
  3. 커밋
  4. 커밋
  5. 커밋
  6. ...
  1. 첫 번째 커밋
  2. 기능 A 추가
  3. 기능 B 추가
  4. 기능 A 개선
  5. 리팩터링
  6. ...

Staging Area

staging area

repository

working dir

작업대

박스

접수대

add

commit

branch

'목적(용도)'에 따른 분기

branch / merge

Fork

원본 저장소

개인 저장소

로컬 저장소

fork

clone

Remote

Local

원본 저장소

개인 저장소

로컬 저장소

1. Pull

2. Push

3. PR

origin

upstream

Git Commands

init

clone

commit

branch

checkout

switch

restore

remote

push

pull

merge

rebase

cherry-pick

reset

config

add

fetch

stash

status

log

diff

tag

rm

revert

reflog

clean

archive

mv

submodule

show

gc

Local

Repository

init

init

Local

Repository

Local

Repository

Remote

Repository

clone

Local

Repository

clone

Local

Repository

Remote

Repository

commit

push

pull

sync

References

처음 시작하는 Git & GitHub

By Dong-Young Kim

처음 시작하는 Git & GitHub

  • 239