At work I've faced 2 generic approaches to branching:
- "Modern", where we have branch-per-feature policy:
http://nvie.com/posts/a-successful-git-branching-model/ - "Classic", where everybody commit to the trunk and branches are made only for releases:
http://paulhammant.com/2013/04/05/what-is-trunk-based-development/
- CI (Continious integration)- you merge often, and you have ci server testing your code. In first approach, you'll need job-per-branch, and there are a lot of them! In second, one job will notify you then your commit is breaking something
- If your changes are not compiling\not all test pass? Well, in this case solution is to commit but don't push.
- Second approach forces some sporadic code review, when 2 developers change some linked source - and this triggers communication and is a good way to common vision.