在推送当前分支期间签出新的git分支是否安全? [英] Is it safe to checkout a new git branch during the push of a current branch?
问题描述
例如,如果我将 master
推送到远程仓库,并且需要一段时间,是否可以安全地打开另一个终端并执行 git checkout secondbranch
这样我就可以重新开始工作了?是否原始进程会被新的结账中断?
它应该是安全的,因为push是阅读从您本地的回购和写入到远程,并签出正在从您当地的回购和写入您的工作区。
好的可视化的东西,其中:
http://www.ndpsoftware.com/git-cheatsheet.html#loc = local_repo ;
For example, if I am pushing master
to a remote repo and it's taking a while, is it safe to open another terminal and do git checkout secondbranch
so I can start working again? Is the original process doing the push going to be disrupted by the new checkout?
It should be safe, because push is reading from your local repo and writing to the remote, and checkout is reading from your local repo and writing to your workspace.
Nice visualization of what-goes-where: http://www.ndpsoftware.com/git-cheatsheet.html#loc=local_repo;
这篇关于在推送当前分支期间签出新的git分支是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!