User Tools

Site Tools


This is an old revision of the document!


How to write an arbitrary blob to a repository to add “supplemental” information.

The recipe

Feed arbitrary text into git hash-object, and write the corresponding blob to the object store:

echo "Robert P. J. Day" | git hash-object -w --stdin
$ git show -p 8a1385ff5d6ab8c195f99931042b7afaf418e6b0
Robert P. J. Day

In order for that blob not to be garbage-collected, tag it:

$ git tag fullname 8a1385ff5d6ab8c195f99931042b7afaf418e6b0

Show it:

$ git show fullname
Robert P. J. Day
git_writing_an_arbitrary_blob.1551187115.txt.gz · Last modified: 2019/02/26 13:18 by rpjday