Git internals for fun and profit

Just ran across this very enjoyable article about how GitHub sped up cloning by several orders of magnitude –

If you haven’t seen it, check out the git commit graph.  In the Linux kernel tree, the time for me to show the commit graph of the five most recent commits went from five seconds to 20ms!  Requires Git 2.18+, which you can install on Ubuntu LTS from a PPA per this.  Short version:

git config --global core.commitGraph true

and then, in each repo:

git show-ref -s | git commit-graph write --stdin-commits

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.