[英]Changes from repository lost on git pull
I've had a couple issues at work where changes someone else made in the repository are lost when I pull. 我遇到了几个问题,当我提取信息时,存储库中其他人所做的更改会丢失。 I can't figure out why their work, which was committed and pushed, is lost when I pull and then push my commits after merging.
我无法弄清楚为什么在合并后再拉动我的提交后,提交和推送的他们的工作丢失了。 Here is my work flow:
这是我的工作流程:
When I do this, the work done in someone else's last commit will be gone. 当我这样做时,在别人的最后一次提交中完成的工作将消失。 I've been trying to figure out why this is happening and what I could be doing wrong.
我一直试图弄清楚为什么会发生这种情况以及我可能做错了什么。 After all my research, I can't figure out what is wrong with my work flow.
经过所有的研究,我无法弄清工作流程出了什么问题。 Is there a reason, maybe in the merge, for the last commit someone else pushed getting lost?
是否有理由(可能是在合并中)有人推动的最后一次提交迷路了? The merge after pulling is done automatically.
拉动后的合并是自动完成的。
Use fetch instead of pull .. it will solve the problem 使用提取而不是拉 ..它将解决问题
Here is the link which will give deeper look 这是链接,将提供更深入的了解
http://longair.net/blog/2009/04/16/git-fetch-and-merge/ http://longair.net/blog/2009/04/16/git-fetch-and-merge/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.