Git: how to completely delete commit before a specified one? -
after years of git commits, we'd delete old ones.
we have commit number want consider new 'base'.
how can ask git remove all(and remove) commits before specified one?
create temporary branch commit , rebase against it:
git checkout --orphan temp commitid git commit -m "truncated history" git rebase --onto temp commitid master git branch -d temp
where commitid
new base. check the article details.
Comments
Post a Comment