[英]Git pull from remote branch to a new local branch, why I found a commit in the branch from which I stated the command?
让我解释一下发生了什么事。
当前分支是koala-dev。 从这个分支中,我调用了命令
git pull origin preproduction:preproduction
请注意,本地分支预生产不存在。
我发现:
如预期的那样,名为preproduction的新本地分支与具有相同名称的远程分支同步
但我也用以下命令在我的koala-dev分支的日志中找到了一个新条目(提交):
将xxxx:/ opt / git / myremoteproject的分支'preproduction'合并到koala-dev中
为什么会这样呢?
通过声明:git pull [来源] [来源]:[目标]
它应该只同步源/源--->目标吗? 是不是
来自: git help pull
手动输入页面,我们可以阅读:
Incorporates changes from a remote repository into the current branch.
仅更新preproduction
分支,您需要先签出preproduction
然后进行拉取。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.