git 이해하기 위한 정리

2022. 8. 30. 17:48공부 정리

 

---------------------------------------------------------------------------------------------------------

Git Phase

Working Space >> Stage >> Local Repo >> a Branch >> Remote Repo

 

workspace to stage >> add/mv/rm **

stage to workspace >> reset HEAD **

 

stage to localrepo >> commit

 

local repo to branch >> push

branch to local repo >> fetch

 

remoterepo to workspace >> clone/pull

---------------------------------------------------------------------------------------------------------

 

remote - 컴퓨터 내 init한 폴더와 git 안에 있는 프로젝트 폴더 연결

 

fork

원본 복제, 원본과 연결되어 있고, origin은 fork 받아온 원본

원본이 변경되면 (w/ commit) 수정된 사항 적용 가능(fetch/rebase)

 

clone

따로 레포지토리 생성해서 복사

원본과 연결되어 있지 않고, origin은 따로 생성한 복사본

 

728x90