How to track other repo's branch

Initialize own branch to track another branch of another remote

git init
git checkout --orphan upstream-xxx-master
git remote add upstream-xxx https://github.com/other/xxx.git
git fetch upstream-xxx
git merge upstream-xxx/master

Push the own branch to own repo

git remote add origin https://github.com/self/yyy.git
git push --set-upstream origin upstream-xxx-master

Rebase the tracking branch

git checkout upstream-xxx-master
git fetch upstream-xxx
git rebase upstream-xxx/master