Turning a complete repository to a shallow one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Now the repository becomes shallow and all of history is _lost_. It is
a feature for those who wants to reduce disk usage, but it's also a
gun to shoot at your feet. I'm tempted to ban this case. If I want to
reduce disk usage, I should be forced to shallow clone it first, then
remove the original repository. I still have a complete repository if
I change my mind. And "rm -rf git" is alarming enough for me to think
it twice before executing.

Comments?
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]