1. clone

클론은 레파지토리에서 파일을 로컬로 받아 처음 프로젝트 시작하고자 할 때 사용한다.

git clone (레파지토리 주소)

 

2. fetch

remote repository의 내용은 확인하고 싶지만, local repository랑 병합(merge)는 하고 싶지 않을 때 쓴다.

git fetch (레포이름 ex)origin) (브랜치이름)

 

 

3. pull

remote repository의 내용은 확인하여, local repository와 병합(merge)할 때 사용.

작업 시작전 미리 pull하는 것을 습관화 하자.

git pull (레포이름) (브랜치이름)

 

 

 

 

출처 : https://velog.io/@bufflect/Git-clone-vs-fetch-vs-pull

 

[Git] clone vs fetch vs pull

clone git clone = git init + git remote origin origin + git pull github repository에서 local으로 새로 파일을 받아와 프로젝트 작업을 시작할 때 사용한다. git fetch github reposi

velog.io

 

+ Recent posts