If I do the following and only the following:
A
)B
)B
to A
)B
to a third computer (call this new personal repo C
)Now let us imagine that the server is destroyed so B
no longer exists. In this scenario, if I push changes from A
, can C
still fetch those changes?
Or in other words does git push changes to remotes in a 'chained' manner, or do all remotes on a 'cluster' know about each other?
First of all, you never pushed any changes from A
to B
. So while A
knows about B
, B
doesn't know anything about A
nor does it contain any data from it.
Pushing from A
to B
would work from A
(since A
knows about B
). The data would end up in B
. No matter how many other repos know about B
, B
won't push the changes further. Instead the other repos would have to pull them from B
.
If we assume that you pushed at least once from A
to B
and cloned to C
, you could add C
as a remote to A
and then push to it. But C
will never "magically" contain data that are pushed between the other repos. Data is only copied into a repo when someone pushes to it or pulls from somewhere.
So for every operation, only 2 repos are ever involved.