I am trying to use pygit2 library.
seems I got stuck on the first step. its documentation doesn't explain how to create a blob and add it to a tree. It is mostly around how to work with an existing git repository but I want to create one and add blobs, commits, ... to my repo. Is it possible to create a blob from a file directly or should I read the file contents and set blob.data?
from pygit2 import Repository
from pygit2 import init_repository
bare = False
repo = init_repository('test', bare)
How can I create and add blobs or trees to the repository?