logoalt Hacker News

snthpytoday at 2:38 AM5 repliesview on HN

I've been wanting to ask this:

Why isn't

    git clone --depth 1 ... 
the default?

I would guess that for at least 90% of the repos I clone, I just want to install something. Even for the rest, I might hack on the code but seldom look into the history. If I do then I could do a `git fetch` at that point and save the bandwidth and disk space the rest of the time.


Replies

dwattttttoday at 2:56 AM

A question: why is git involved at all in this? You don't want a repository.

show 2 replies
jurakovictoday at 4:24 AM

What if that's only you? Git isn't made only for those who "just want to install something"

show 1 reply
aa-jvtoday at 8:07 AM

Its not the default because that'd be counter-productive to developers who use git with larger repositories, which is how git started life in the first place - your clone depth would be entirely useless for Linux kernel developers, for example, if it were default ..