在git中,在拉出之后,它会下载远程存储库历史记录中存在的所有对象,从一开始就像第一次签出一样
未给出任何错误
大约需要1小时的下载时间
案例研究:
UserA
git pull origin branch
remote: Counting objects: 23024, done.
<edits>
git add .
git commit -m "test1"
git push origin branchUserB
git pull origin branch
remote: Counting objects: 23025, done.
<edits>
git add .
git commit -m "test1"
git push origin branchUserA
git pull origin branch
remote: Counting objects: 250, done.
<edits>
git add .
git commit -m "test1"
git push origin branch此时UserB on pull,git再次重新下载远程存储库UserB上存在的所有对象
git pull origin branch
remote: Counting objects: 24125, done.
Receiving objects: 100% (24125/24125), 1007.93 MiB | 1.17 MiB/s, done.
Resolving deltas: 100% (15457/15457), done.
Checking connectivity... done.
Checking out files: 100% (5307/5307), done.发布于 2016-05-02 19:06:58
这不是随机的。
这就是git的工作原理。
当您将代码添加到git (git commit)时,它将在下次下载。
用户A
# Download latest version
git pull origin branch
<edits>
git add .
git commit -m "test1"
# New changes are send to server
git push origin branch用户B
# Download all changes user A added to git
git pull origin branch
<edits>
git add .
git commit -m "test1"
# Push new changes to server
git push origin branch注释:在这一点上,用户A还没有这些更改,他将在下一次提取时获取它们。
用户A
# Now user A gets the updates form the server
git pull origin branch
<edits>
git add .
git commit -m "test1"
# Again - send updates to the server
git push origin branch此时UserB on pull,git再次重新下载远程存储库中存在的所有对象
如上所述-用户A将新内容添加到远程存储库,该内容在用户B存储库中尚未找到,因为在下一次拉入时,内容将再次下载(仅从上一次拉入的增量)
https://stackoverflow.com/questions/36979315
复制相似问题