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
'Collaboration Tool > Git & Github' 카테고리의 다른 글
Git] error: Your local changes to the following files would be overwritten by checkout (0) | 2022.11.03 |
---|---|
Git] Terminal : add, commit 취소하기 (0) | 2022.11.01 |
Git] Terminal : 깃허브 레파지토리 복제해 새로운 레파지토리 만들기 (0) | 2022.11.01 |
Git] SourceTree : commit, push (0) | 2022.10.31 |
Git] Terminal : 협업) 내 코드를 처음 organization에 올리기 (0) | 2022.10.31 |