def commit_changes(self, push=False):
git_repo = Repo(self.repo)
git_repo.git.add('content/')
try:
git_repo.git.commit('-m', 'Commit added by PaperGit')
self.last_run = time.time()
self.save()
except GitCommandError:
print('Nothing to commit')
if push:
print("Pushing changes to remote")
git_repo.git.push('origin')
评论列表
文章目录