Skip to content

원본 저장소와 Fork한 저장소 동기화 하는 방법 #270

@Jiny530

Description

@Jiny530

*Fork 저장소에서 수행

  1. 연결된 저장소 확인
   git remote -v
   
   // 명령어 결과가 아래처럼 나온다면 아직 원본 저장소와 연결되지 않은 상태
   origin https://github.com/포크 저장소.git (fetch) 
   origin https://github.com/포크 저장소.git (push) 

  1. 원본 저장소 연결하기
   git remote add upstream https://github.com/원본 저장소.git
  1. 원본 저장소의 최신 커밋 받아오기
   git checkout main // 커밋을 적용할 브랜치
   git fetch upstream
   git merge upstream/main
  1. fork한 저장소에 최신 커밋 반영하기
   git push origin main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions