Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git clone 太大了 #413

Open
hausen1012 opened this issue Sep 5, 2022 · 9 comments
Open

git clone 太大了 #413

hausen1012 opened this issue Sep 5, 2022 · 9 comments

Comments

@hausen1012
Copy link

源码没这么大,是不是 git log 太大了导致的

@jaywcjlove
Copy link
Owner

jaywcjlove commented Sep 5, 2022

@hausen1012 这个应该是维护了很多年,然后 gh-pages 分支提供下载各种....,比如 linux-command.docset.tgz 这个压缩包,以前都提交到 gh-pages 分支提供下载,后面改成了自动上传 released 上,进行下载...

可能你加上个参数,也许能解决一下 --depth 1 ? git 版本 > 2.32

git clone https://github.com/jaywcjlove/linux-command.git --depth 1

@jaywcjlove
Copy link
Owner

image

这个压缩包不应该提交到 gh-pages 分支,每次提交都提交这个玩意儿。应该没有办法 diff,后面会不会越来越大

@hausen1012
Copy link
Author

对,加上了 --depth 1 解决了,之前我一直以为哪里有问题,明明下载压缩包很小的。谢谢

@hausen1012
Copy link
Author

如何可以的话还是希望能够解决一下哈哈哈,git clone 和直接下载压缩包一样大就好

@jaywcjlove
Copy link
Owner

@hausen1012 这怎么解决,已经提交上去,删除仓库重新建一个也不合适吧

@vinjn
Copy link

vinjn commented Oct 7, 2022

The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history:

https://rtyley.github.io/bfg-repo-cleaner/

@wzk0
Copy link

wzk0 commented Oct 23, 2022

@hausen1012 这怎么解决,已经提交上去,删除仓库重新建一个也不合适吧

有一个不是很妥但是操作简单的方案

就是删除本地的.git文件夹,重新init和remote,最后push --force

@ipme
Copy link

ipme commented Feb 21, 2023

没办法。只能用最笨的方法了。
下载、zip 压缩包了。 git clone 太大了。。

@jaywcjlove
Copy link
Owner

$ git clone https://github.com/jaywcjlove/linux-command.git -b master --single-branch --depth 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants