Skip to main content

Configuración de un repositorio remoto para una bifurcación

Debes configurar un remoto que apunte al repositorio ascendente en Git para sincronizar los cambios que realizas en una bifurcación con el repositorio original. Esto también te permite sincronizar los cambios realizados en el repositorio original con el repositorio bifurcado.

Platform navigation

  1. Abra TerminalTerminalGit Bash.

  2. Enumera el repositorio remoto configurado actualmente para tu bifurcación.

    $ git remote -v
    > origin  https://github.com/YOUR-USERNAME/YOUR-FORK.git (fetch)
    > origin  https://github.com/YOUR-USERNAME/YOUR-FORK.git (push)
    
  3. Especifica un nuevo repositorio remoto upstream que se sincronizará con la bifurcación.

    git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git
    
  4. Verifica el nuevo repositorio ascendente que especificaste para tu 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)