I'm in my first job now, and it is a startup. The developers aren't top notch (me neither) but we get things done and learn together how to accomplish complex stuff.
But there is one thing that we aren't coordinating quite right, that is the git repo.
It is messy, there are many commits in the dev branch that are not going to be in the master branch. We don't make branches specific for features, so almost every time something that shouldn't go goes to master branch. We mostly commit in the dev branch, which is not a good thing to do, and causes the problem that I stated before.
So, thing is, I think there is no uniform way to do this that everyone does, but there a few things that I started doing that helped a lot. For example, now I only develop in branches, and all of them are changes in a single specific feature. All branches come from master, so it avoids unexpected problems in production.
Still, there are sometimes a struggle, with merges, and conflicts. Because sometimes features touch each other, or people have the same idea over naming stuff. And it frustrates me a lot, because most of the time I need to fix things that are consuming time that I should be developing the feature I want to deploy.
How did you have a hard time with git? How do you manage avoiding it?