Three-Linked Repositories
Explore techniques for working with multiple linked Git repositories, including cloning, adding remotes, fetching updates, and merging changes. Understand how distributed teams synchronize branches without depending solely on the central origin, applying Git workflows designed for collaboration and code integration.
We'll cover the following...
We'll cover the following...
Now you are going to work with multiple repositories.
You’re going to do the same as you did in the last chapter, but this time you will create two clones of the origin: alice_cloned and bob_cloned.
1 mkdir -p lgthw_remotes
2 cd lgthw_remotes
3 mkdir git_origin
4 cd git_origin
5 git init
6 echo 'first commit' > file1
7 git add file1
8 git commit -am file1
9 cd ..
10 git clone git_origin alice_cloned
11 git clone git_origin bob_cloned
Now alice_cloned and bob_cloned have git_origin as the origin remote:
12 cd alice_cloned
13 git remote -v
Alice makes a change in her ...