Recently doing an internship and working on a front-end project. Everyone in the team has a complete version library, but the addresses that everyone clones remotely at the beginning are different (for example, I am aaa@X.com and my colleague is bbb@X .com, ccc@X.com, etc.), then, when everyone makes their own modifications and then pushes it to the remote, doesn't it only push to their own remote library? But why can I pull down other people's modifications as if our remote library is the same?
You said that the repository that everyone clones at the beginning should be
fork
来自同一仓库的,就是说有一个公共仓库sss
,你说的aaa
,bbb
,ccc
都是fork
来自sss
的仓库,然后每个人修改了在推送自然是往各自的仓库推送的,但是aaa
可以向sss
发起一个PR,就是pull request
,那么这个pr如果被合并到sss上之后,你就可以在本地添加sss
's remote repository, and then pull down other people's modifications.The corresponding git command is as follows:
Suppose your remote warehouse
ddd
fork来自sss
,那么你可以clone下来ddd
之后,添加远程sss
is the warehouseIf
aaa
修改了自己的仓库代码之后,向sss
发起一个pull request
,sss
又合并了这个PR,那么你在本地可以pull下来sss
changes