批量提交git代码 2025-6-05 11:52 | 38 | 0 | 软件使用 172 字 | 7 分钟 所有的项目需要单独放到一个目录,然后git库中的名称需要与项目文件夹名称一致 import os import subprocess import shutil from pathlib import Path def is_git_repo(path): """检查路径是否为Git仓库""" try: subprocess.run( ['… GitPython