So, the situation is like this: Say I have 3 branches in my local git repo: master, dev, staging.
Now, I have different servers for each branch that I want to push to.
For example I have set prodS (prodServer) as remote to master and have it mapped to master(git push -set--upstream prodS master). So that git push pushes master to prodS when I have checkedout master.
Similarly, devS for dev branch, stagingS for staging branch
When my dev and staging branches are ready for push, (Regardless of which branch I have currently checkedout,) I want to be able to run a single command that pushes dev to devS and staging to stagingS; instead of having to switch to each branch and then run git push or run git push devS dev and so forth for each branch since I already mapped dev to devS/dev.
Is there such an option in git itself? Or the only option here maybe some other workaround like a script?