I am absolutely miserable when I get in a situation where I have to merge other developers' changes into mine. When using
git and working on a really extensive change, that happens a lot.
When I start working on a change, I make a new local branch and start working in it. The intent is to push my changes to the remote from it once I am done. The concept seems wonderful if it weren't for one pesky complication: other people are making changes to the same files as you are in the meantime.
I am looking for a set of techniques and policies to minimize my exposure to having to reconcile my changes with those of other people who have pushed their change to the same file after I pulled it from the remote, since there is no such thing as locking in git.
For example, will pulling from remote into my local branch on a daily basis reduce this exposure overall? Are there other tricks and techniques? Also, if you have a set of git commands that you run to sync up regularly, please share. I am literally in a situation where I spend more time syncing my changes to other people's than writing code -- and I think this is not an efficient model. It is either that I am doing something wrong or we are doing something wrong as a team. I am miserable because of it and it seriously affects my quality of life.
I understand and acknowledge the benefits of git and I love being able to switch branches so easily. But I feel that the exposure it leaves to merging is an elephant in the room many in the community refuse to or are kindof dogmatically discouraged to discuss.