A seguir a sequências de comando para atualizar um repositório fork a a partir das mudanças originais.
$ git remote add upstream https://github.com/opencv/opencv $ git fetch upstream remote: Counting objects: 53, done. remote: Compressing objects: 100% (3/3), done. remote: Total 53 (delta 40), reused 41 (delta 40), pack-reused 10 Unpacking objects: 100% (53/53), done. From https://github.com/opencv/opencv * [new branch] 2.4 -> upstream/2.4 * [new branch] master -> upstream/master
$ git checkout master Already on 'master' Your branch is ahead of 'origin/master' by 237 commits. (use "git push" to publish your local commits)
$ git rebase upstream/master First, rewinding head to replay your work on top of it... Fast-forwarded master to upstream/master.
Caso deseje remover o upstream
$ git remote add upstream https://github.com/opencv/opencv