i have git repository 1 year of development history, , 37gb. how can minimize size in way delete old history? is, need history covers last 2 months, others can removed.
the 3 main options are:
- removing large files history (with, instance, bfg)
- split repo subfolder own repo
- split repo history (starting new repo head of new repo, keeping old 1 archive).
on last point, see "how remove old history git repository?", using script 1 (with sha1 of commit 2 months ago, parameter)
#!/bin/bash git checkout --orphan temp $1 git commit -m "truncated history" git rebase --onto temp $1 master git branch -d temp # following 2 commands optional - keep git repo in shape. git prune --progress # delete objects w/o references git gc --aggressive # aggressively collect garbage; may take lot of time on large repos since rewrites history, need git push --force.
since op pushing git.assembla.com (see discussion), this issue states
you need enable
--forceoption.
done git repository settings tab. need 'owner' on space see settings tab.
Comments
Post a Comment