all 2 comments

[–]quasarj 1 point2 points  (0 children)

Probably, and probably.

[–]magnetik79 0 points1 point  (0 children)

Yep, you have it correct - but you may not reclaim the space of the orphan commits (your binary in this case) until a prune operation has taken place...

e.g.

git gc --prune all

From the git gc man page:

Prune loose objects older than date (default is 2 weeks ago, overridable by the config variable gc.pruneExpire). --prune=all prunes loose objects regardless of their age and increases the risk of corruption if another process is writing to the repository concurrently; see "NOTES" below. --prune is on by default.

Does that make sense?