-
Öffnen Sie Ihr Terminal oder Git Bash.
-
Liste die Remotes auf, die derzeit für deinen Fork konfiguriert sind.
$ git remote -v > origin https://github.com/YOUR-USERNAME/YOUR-FORK.git (fetch) > origin https://github.com/YOUR-USERNAME/YOUR-FORK.git (push) -
Fügen Sie eine neue Remote mit dem Namen upstream hinzu, die auf das ursprüngliche Repository verweist.
git remote add upstream https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git -
Überprüfen Sie das neue Upstream-Repository, das Sie für Ihren Fork angegeben haben.
$ 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)
Konfigurieren eines Remoterepositorys für einen Fork
Richten Sie in Git ein Remote ein, das auf das Upstream-Repository verweist, um Änderungen zwischen Ihrem Fork und dem ursprünglichen Repository zu synchronisieren.