Need some help with organizing branches and workflow.  

Preconditions: 10 developers with git, 0 unit tests coverage, 10^5 lines of code.

In our repo with have `master` branch which acts as `production`.  

Each feature is developed on a different branch, which also creates a new domain (`branch.qa.com`)

When It's done, QA team goes through the changes on the `branch.qa.com` and then it's merged into master and automatically pushed to production server.

**The problem**:  

branch A could have `css` changes. It gets uploaded to `A.qa.com` and being checked.  

Meanwhile the developer forks branch `B` from `master` and works on it, modifying the same `css`. 

Both changes seems to be legit for their branches, but it may happen that change on `B` actually crushes something on `A`.

Merging `A` into `master` will be ok. Then merging `B` into `master` will have bad impact on the changes made by `A`.

**Ho do you rule out this situations? How do you incorporate `pre production`?**