Reputation: 613
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.
Upvotes: 2
Views: 2191
Reputation: 596
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/
Upvotes: 3