English 中文(简体)
预测有多少数据会被推向诱人的推动
原标题:Predict how much data will be pushed in a git push

我有时在昂贵的互联网连接上,并想知道(至少大约)有多少数据将推向遥远的<条码>git 推导/代码>。

最佳回答

实际上,我认为我的意见足以把它作为答案!

当你推一下时,烟雾会形成一整套所有必要的物体和向边远载荷。 这意味着我们重新寻找一种方式来预测这种包装的规模。 由于包装被压缩,因此很难根据大小或物体大小做任何事情;我们确实想要做的是,这套包装将多么大。 如果你能够打断该推进器,就在它建造了包装后,并决定根据包装大小进行推进,那就不错了,但我认为这是不可能的。 我的最好的猜测是试图重新计算将推推推的包装并检查。

bundle file is fundamental a Pack with Header information (have a look at ,如果你愿意的话。 这意味着它拥有一支方便的孔孔波拉宁指挥系统,该指挥系统能为你所关心的大小建立一个档案。 (http://www.kernel.org/pub/software/scm/git/docs/git- Pack-objects.html”rel=“noreferer”> 包装-objects。) 类似情况:

git bundle create foo.bundle ^origin/master master

鉴于地处边远的原产地/主,这给你带来了一个包含一切所需东西的dle,而这正是应当由<代码>git 推向原主<<>/代码>的同一东西。 如果你有更多的分行,你也会把他们推向前进;它只是花了更新名单的力量:

git bundle create foo.bundle ^origin/master master ^origin/topic topic ...

仅检查这些制造的dle的大小;这几乎相当于你推动的ll。 这确实意味着,你不得不两度生产包裹(从捆绑起,一度在推进下),但除非这确实是一个巨大的推动力,需要很长的时间才能包装,否则就是一个巨大的问题。

问题回答

非常确切地说,你可以把Bash的一条类似的轨道运行到Gite在创建包装档案时将进行内部操作,以便推动:

$ echo $(git merge-base HEAD origin/master)..HEAD | git pack-objects --revs --thin --stdout -q | wc -c

如果生产包装档案的细数,Gite将发送。 缩略语:

# Find the common ancestor of HEAD and origin/master, and output a
# revision range (<a>..<b>) string to git pack-objects.
echo $(git merge-base HEAD origin/master)..HEAD

# Generate the pack file containing the revision range specified above, writing
# it to stdout.
git pack-objects --revs --thin --stdout -q

# Print the byte count of the file contents passed via stdin.
wc -c

这取决于在您的推动下行使<代码>git fetch的权利;如果你不这样做,Gite就能够找到共同的祖先,并将发送整个存放处的内容。 见





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签