models.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:paper-to-git 作者: maxking 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号