💡
原文中文,约700字,阅读约需2分钟。
📝
内容提要
国内访问 GitHub 速度慢,导致 git push 失败。解决方法是在项目目录下创建一个 Python 脚本 push.py,使用 subprocess 模块自动重试 git push,失败时每隔5秒重试,直到成功。
🎯
关键要点
- 国内访问 GitHub 速度慢,导致 git push 失败。
- 解决方法是在项目目录下创建一个 Python 脚本 push.py。
- 使用 subprocess 模块自动重试 git push,失败时每隔5秒重试,直到成功。
- 脚本中包含 git add 和 git commit 的命令。
➡️