Reputation: 11
my problem is, i have 4 servers and 1 development machine from where i want push all my local changes in git to all 4 server in one command ....you can call it like syncing git repo.
i have tried lots of thing. like making sh file and add 4 times git push command but again i found another complexity about how to send password with push command.
similarly, after pushing all changes by typing 4 times password on sh file..finally i am able to push all changes to the remote but not able to switch that branch on remote side..??
please help me how can i do that
arun
Upvotes: 1
Views: 54
Reputation: 2883
Git does not have support for remote operations, other than "push". An alternative would be to use ssh
(to access git repos and to do maintenance operations) and export your public key to all four servers.
[Edit]
If you can not use ssh then you can try a less secure aproach
git push --repo https://name:password@my-server/repo.git
or update the remote url
git remote set-url origin https://name:password@my-server/repo.git
Upvotes: 1