git 删除分支后 如何删除远端仓库的分支并且使远程的仓库大小变小呢?
PHPz
PHPz 2017-04-24 09:12:36
0
2
874

我有个代码库删除了一个分支,因为那个分支很占空间,所以删除了。
但是我从这个代码仓库的git服务器上(我自己搭建的git服务器)看这个代码库的存储文件夹空间大小并未改变。

分支删除后(git push origin :test),如何删除远端仓库的分支并且使远程的仓库大小变小呢?

PHPz
PHPz

学习是最好的投资!

reply all(2)
PHPzhong

Execute the git gcgit prune --expire command in that repository to remove git objects that are no longer referenced. See: Git - Maintenance and Data Recovery

刘奇

Sorry, I misunderstood.
Regardless of whether it is modified or deleted, the record is still there in case you want to restore it, so the size will not shrink after you delete it.
You need to delete the record of this branch

1 构建一个根提交
2 将提交迁移到根提交

See the git rebase command for details.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!