如果要将空提交推送到 Git 仓库,可以使用命令 git commit
的 --allow-empty
选项:
git commit --allow-empty -m "Empty commit"
如果要将没有消息的提交推送到 Git 仓库,可以使用命令 git commit
的 --allow-empty-message
选项:
git add .
git commit --allow-empty-message -m ""
最后,推送到 Git 仓库:
git push
相关文章:
参考: