TIL - How to Git Push to Multiple Repositories
I have a personal project that I wanted to push to both tangled.sh (self-hosted) and GitLab. In case something happened to my personal homelab and backups. You can do this but adding another remote i.e. 1: git remote set-url --add --push origin [email protected]:hmajid2301/go-routinely.git Make sure to add both repositories with this command Then when you go git push it will push to all repositories. You can double check with: goroutinely on fix/ci [$] via 🐹 v1.25.5 via ❄ impure (nix-shell-env) ❯ git remote show origin Welcome to this knot! * remote origin Fetch URL: [email protected]:majiy00.tngl.sh/go-routinely Push URL: [email protected]:majiy00.tngl.sh/go-routinely Push URL: [email protected]:hmajid2301/go-routinely.git HEAD branch: main https://stackoverflow.com/questions/14290113/git-pushing-code-to-two-remotes ↩︎ ...