在 git push 是 运行ning 时 运行 其他 git 命令是否安全?

Is it safe to run other git commands while git push is running?

当我到达我认为已准备好部署的开发分支时,我有时会执行以下操作:

git checkout master
git merge --no-ff develop --no-edit
# Latency occurs here
git push
git checkout develop
git merge --ff master
git push

在等待第一个 git push 发生时,打开一个新终端是否安全 window 和 运行 检查开发、合并到 master 和中的命令将开发推送到远程存储库?

相关问题:Is it safe to checkout a new git branch during the push of a current branch?,但只谈git checkout是否安全

While waiting for the first git push to happen, is it safe to open up a new terminal window and run the commands for checking out develop, merging in master, and pushing develop to the remote repository?

是的,因为主 HEAD 未被其他操作修改:如果第一个 git 推送有任何问题,您将能够重试,使用相同的主 HEAD 进行相同的推送。

同时,那个master HEAD也可以合并开发。

但请注意,对于 (在不同的分支上),您需要等待:推送是按顺序完成的。