How can I resume a git history rewrite?

前端 未结 2 1450
耶瑟儿~
耶瑟儿~ 2020-12-18 06:07

I\'m rewriting the history of a fairly big repo using git filter-branch --tree-filter and it\'s taking a few hours. I see that git is using a temporary director

2条回答
  •  执笔经年
    2020-12-18 06:27

    Roberto mentioned this in his answer, but I want to give a benchmark for it: If your git filter-branch operation is taking to long to complete, consider an AWS high memory instance.

    I once had to filter-branch and merge together 35 different repositories, each with two years of dozens-of-commits-per-day history. My script failed to complete in 25 hours on my laptop. It completed in 45 minutes on an m2.4xlarge instance in Amazon.

    Total cost?

    $1.64 -- less than I spend on a 20oz soda.

    BFG sounds like a great tool and I'd encourage anyone who routinely rewrites history to try it out. But if you just need something to work and have easy access to AWS, filter-branch is trivially easy.

    In 2016 this is even cheaper. Just mosey on over to the Spot Advisor and find yourself something of the "cluster compute for $0.30 / hour variety.

提交回复
热议问题