HOWTO remove all dangling commits from your git repository

A good explanation of the dangling (fr: ballants) commits source tells you how they get created.

git fsck --full
Checking object directories: 100% (300/300), done.
Checking objects: 100% (10658/10658), done.
dangling commit x....
dangling blob y....
dangling commit z....
dangling blob w....
dangling blob a....
dangling commit b....

How to quickly remove those?
git reflog expire --expire=now --all
git gc --prune=now


Post a Comment

Pascal Fares and Open Source Lebanese Movement >

Popular posts from this blog

Setting Up Network RAID1 With DRBD On Ubuntu 12.04

Go Google Go! A Language on Full Throttle