Skip to main content

Enterprise Server 3.20 está disponível no momento como versão candidata a lançamento.

Configurar um repositório remoto para um fork

Você deve configurar um remoto que aponta para o repositório upstream no Git para sincronizar alterações realizadas em um fork com o repositório original. Isso também permite sincronizar as alterações feitas no repositório original com o fork.

Platform navigation

  1. Open TerminalTerminalGit Bash.

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

    $ git remote -v
    > origin  https://HOSTNAME/YOUR-USERNAME/YOUR-FORK.git (fetch)
    > origin  https://HOSTNAME/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://HOSTNAME/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git
    
  4. Verify the new upstream repository you've specified for your fork.

    $ git remote -v
    > origin    https://HOSTNAME/YOUR-USERNAME/YOUR-FORK.git (fetch)
    > origin    https://HOSTNAME/YOUR-USERNAME/YOUR-FORK.git (push)
    > upstream  https://HOSTNAME/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (fetch)
    > upstream  https://HOSTNAME/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (push)