TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Notes on using git-replace to get rid of giant objects

59 点作者 lainon超过 6 年前

4 条评论

leipert超过 6 年前
If you want to go the mentioned &quot;rewrite-whole-history&quot; route, I have used BFG Repo Cleaner [0] successfully in the past. It&#x27;s way faster than git-filter-branch [1].<p>Another thing: You can work with shallow clones. If the commit is ancient, no need to pull the whole history of a project.<p>[0]: <a href="https:&#x2F;&#x2F;rtyley.github.io&#x2F;bfg-repo-cleaner&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rtyley.github.io&#x2F;bfg-repo-cleaner&#x2F;</a><p>[1]: <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-filter-branch" rel="nofollow">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-filter-branch</a>
评论 #18183078 未加载
评论 #18174068 未加载
评论 #18174272 未加载
评论 #18173027 未加载
评论 #18174671 未加载
tln超过 6 年前
Maybe create a `new-master` branch with the offending commits rebased out; then automation to cherry-pick new commits between `master` to `new-master`.<p>Or change all CI &#x2F; dev docs to use `--depth`, and save more than 350MB per checkout in the process.
评论 #18177649 未加载
TekMol超过 6 年前
What would happen if you:<p>1. checkout the last commit before the bad one.<p>2. cherry-pick every commit after the bad one.<p>Would that get rid of the bad commit?
评论 #18173993 未加载
评论 #18174000 未加载
gorkish超过 6 年前
Fire the BFG. It&#x27;s a no-brainer.
评论 #18176282 未加载