-
Abra o terminal ou o Git Bash.
-
Liste os repositórios remotos atualmente configurados para seu fork.
$ git remote -v > origin https://github.com/YOUR-USERNAME/YOUR-FORK.git (fetch) > origin https://github.com/YOUR-USERNAME/YOUR-FORK.git (push) -
Adicione um novo upstream remoto nomeado que aponte para o repositório original.
git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git -
Verifique o novo repositório upstream que você especificou para seu 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)
Configurar um repositório remoto para um fork
Configure um repositório remoto apontando para o repositório original no Git para sincronizar as alterações entre seu fork e o repositório original.