Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在一个干净的 git repo 中,如果我使用添加所有未跟踪的文件,git add .则 git 将所有文件存储blobs在git/objects目录下。
git add .
blobs
git/objects
现在,如果我将文件从索引中删除回工作目录,git reset .则它会清除INDEX但blobs仍然保留在git/objects目录下。
git reset .
INDEX
使用什么命令来清除blobs以及清理对象目录?
如果不手动删除(使用命令)是否会git自动清理那些未使用的 blob?
git
谢谢dk
这个低级 git 命令为我做了,git prune --expire now但不是这个git gc --prune=now或git gc
git prune --expire now
git gc --prune=now
git gc