I have my own private git server at home. At work, i have another team server I set up.
Some of my code is shared, meaning is both on my private server for my private projects, and on the work server for , of course, work projects.
Imagine I clone one of those projects from work, do some work on it, and commit. I do a 'remote add home rhiakath@home:project' , do a 'git push home master', and 'git push origin master'.
But, if i later clone this project again, only the origin remote is present. How can i instruct git to keep my remotes between pushes and clones, so i can always have a work and home remote ( and origin would always be equal to one of those, depending from where i clone ) ?
Thanks
EDIT: Ok, let me clear this a little better. My colleagues would always do a regular clone, and a regular git push origin master, or something. Not 2 origins, or someone else using my home repo, or user. Just want to keep some remotes defined after a push/clone cycle, that's all.
I just want that, after i clone a repo, those two remotes are still defined, so i can do a push home master, and a push work master. Right now, when i clone from the work repo, i have to add again the "home" remote, and push to it, and vice-versa from the home repo.