Git internals

Git tree entry builder

Encode one raw tree entry with mode, basename and object ID.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Concatenate ASCII mode, a space, UTF-8 basename, null byte and raw object ID bytes.

Mode 100644, name a and a 20-byte object ID use 29 bytes.

Limits

One entry only; tree ordering and object-ID content are not checked. Basenames cannot contain slash, null, . or ...