When working with multiple people with git, is it better
- for everyone to just work in master, and merge between each other's masters, or
- for everyone to work in their own titled branch?
As I see it, in the case of (1), although each master acts as a branch, everyone is expected to merge between each other's work with a mostly linear flow, whereas in (2), everyone is expected to merge a common master into their branch, and push changes from their branch into a common master when they are ready.
Can someone with experience working on medium- to large-sized teams with git make any comments? What works best for your team? I guess a third option is to always use feature branches instead of people branches, although I see this as being basically the same situation as (2) from this question's point of view.
I imagine that in both (1) and (2), a single person is responsible for pulling changes to the "official" master. How would this carry over if more than one person as push access to the official master?