I want to push a local repo to multiple remote GIT repositories to achieve redundancy in my backup scheme. So, let's say I plan to use Github and BitBucket to host my repositories.
I have two questions.
- Is this approach advisable?
- If so, how should I best approach writing a shell script to automate my backup procedures? For example, would I need to change my repo identity in the shell script for every backup operation or does a set of commands exist that will make this process easier?
git push
git push
command? What if I have more than two repos for redundancy? I was hoping there might be a way to submit a list of target repos that can be "shotgun blasted" with a singlegit push
command for the purposes of redundancy.git push origin master; git push backup master
would work, if your two remotes are calledorigin
andbackup
for example.