More remotes for a GIT repo

We know we can add some other remotes and its url after an initial git remote add origin, and one more trick is that we can do some group aliases such as:

# <repo>/.git/config
[remote "mars"]
        url = <url-mars>
        fetch = +refs/heads/*:refs/remotes/origin/*
[remote "origin"]
        url = <url-origin>
        fetch = +refs/heads/*:refs/remotes/origin/*
[remote "all"]
        url = <url-mars>
        url = <url-origin>

Then we can push to 2 remotes via one command like git push all master:master.

kfei

Hacker / Tenniser / Photographer / Diver / Entrepreneur

Kaohsiung, Taiwan https://kfei.net

看文章如果不回應, 跟條鹹魚有什麼分別?