You can also use repo.index:
repo.index
repo.index.add(relative_path) repo.index.commit("message")
See https://gitpython.readthedocs.io/en/stable/quickstart.html#add-file-to-staging-area