I'm trying to do something like repo.git.commit('-m', 'test commit', author='[email protected]') but instead of the author, I want to pass the --allow-empty to send a dummy commit to the repo. but the repo.git.commit() complains about the number of arguments I'm trying to pass. This is what I have so far:
from git import Repo
import os
from dotenv import load_dotenv
load_dotenv()
full_local_path = os.getenv('full_local_path')
username = os.getenv('username')
password = os.getenv('password')
remote = f"https://{username}:{password}@github.com:myRepo/myRepo.git"
Repo.clone_from('[email protected]:myRepo/myRepo.git', full_local_path)
Repo.git.commit('-m', 'empty commit', author='xxxxxxxxx')`