Skip to main content

포크에 대한 원격 리포지토리 구성

원본 리포지토리와 포크에서 변경한 내용을 동기화하려면 Git의 업스트림 리포지토리를 가리키는 원격을 구성해야 합니다. 이렇게 하면 원본 리포지토리의 변경 내용을 포크와 동기화할 수도 있습니다.

Platform navigation

  1. Open TerminalTerminalGit Bash.

  2. List the current configured remote repository for your fork.

    $ git remote -v
    > origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
    > origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
    
  3. Specify a new remote upstream repository that will be synced with the fork.

    git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
    
  4. Verify the new upstream repository you've specified for your fork.

    $ git remote -v
    > origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
    > origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
    > upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
    > upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)