Git 分批 push 可以分为两种情况:

  1. 分批 push 本地多个 commit:可以使用 git push origin <branch_name> 命令来将本地多个 commit 推送到远程仓库。Git 会将所有未推送的 commit 一起推送到远程仓库。

  2. 分批 push 本地一个 commit 的多个修改:可以使用 git add -p 命令来选择性地添加修改到暂存区,然后使用 git commit 命令来提交暂存区的修改为一个新的 commit。然后可以使用 git push origin <branch_name> 命令将新的 commit 推送到远程仓库。

无论是哪种情况,Git 都会将本地的 commit 推送到远程仓库,并且保持 commit 的顺序。

git 分批 push

原文地址: https://www.cveoy.top/t/topic/hNS4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录