Tinker Git

by Samy (Kondasamy Jayaraman) · drawn with Colorfigures by April Zhu

Blob id: 7b2ed057c9d1e868387e564bf966724a27e63672 (same as saved)

The page as saved.same name as saved

Chapter 1 of 7

Named by its contents

Mira and Tom keep Larkspur’s price page in Git. Before they change a price, see how Git names each version of the page.

This chapter: How does Git name a version of a file?

About this chapter

You will learn

  • Git names a file’s bytes by their hash
  • One changed byte gives a whole new name
  • The same bytes always give the same name

Words you’ll meet

Blob
Git’s name for one version of a file’s bytes, sealed and stored.
Hash
A fixed-length fingerprint computed from bytes: change any byte and it changes completely.

Step 1 of 4

Git seals each version of the page in a crate, a , named by a of its bytes.

Predict what one new price does.

You change one price on the page. What happens to its crate’s name?