git clone download is too large

Source: Internet
Author: User


The first solution:
Try reducing the Postbuffer size in the Remote repository config. Follow the steps below

Go to remote git repository directory
Run the following command to reduce the size of Postbuffer

git config http.postbuffer 24288000

You can check the this value by doing "git config--get http.postbuffer"
Try Cloning the repository now (back to where is you cloning)
If failed with Error:rpc failed; result=18, HTTP code = $ Try again by incresing the Postbuffer ever further in the CONFIG. Go to step 1.


We need to adjust/override your client ' s settings.

git config--global http.postbuffer 524288000
git config--list


Second workaround:
More than once I heard complaining that the GIT library is so big, it pulls the whole history down and slows down my love?!! Can you just take the last few, even the last version?

#仅获取最新版和一个历史版本, which is the last 2 versions

git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git--depth 1

Note: I just use this method to solve, especially Gitlinux source code


The git clone above only gets the last 2 versions, how do I know?

CD linux-2.6
Git rev-list Master

#只有2个显示哦:
Eeb43e7984e7376f09896a201f82ec9fb5936e21
e905483933c0f16c1c0820c8b1834dbcb5e0c06a

#你也许也已经发现, the latest version is the first display, rev is a bit inconvenient when more, then:
git rev-list master--max-count=10
#上面的命令, you can see it at one glance.

Or not? Well, look at the specific log information:

git log--pretty=format: '%h:%s '--topo-order--graph

#打印:
* Eeb43e7:fix Issue #107
* E905483:add log when load Iocobject in Comboiocloader

#如果你做了一些tag, just want to get a log of a two tag directly
git log--pretty=format: '%h:%s '--topo-order--graph Tag1. Tag2

By default, GIT performs n operations before it compresses space, and I usually have a good time to knock:

#这个命令耗时是比较长的哦
Git GC--aggressive

#快速指令
Git GC
Git Chinese site: http://gitbook.liuhui998.com/

git clone download is too large

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.