From: Junio C Hamano Date: Fri, 11 Jan 2013 04:53:01 GMT Subject: Re: Turning a complete repository to a shallow one Message-ID: <7vk3rkcocy.fsf@alter.siamese.dyndns.org> In-Reply-To: Duy Nguyen writes: > Apparently we could do it: > > git clone --single-branch git.git > cd git > git tag -l|xargs git tag -d > git fetch --depth=1 origin master > git repack -ad I may have been unclear in the earlier message, but this is one of the reasons why I think "fetch --depth" is misadvertised (it says "deepen the history", when the real thing it does is to truncate to the new depth counting from the updated tip), and misdesigned (it forces the user to guess what the new depth should be). It should be advertised correctly, as a way to reset its depth starting from the current history (and of course --depth=1 is truncates). We should introduce a separate "fetch --deepen" that does what normal people would want (see my earlier message with ASCII art).