If the Survivor finds themselves at odds with Shaun and the Institute, there is only one way to ensure that the Commonwealth is safe from the machinations below: Destroying it and the cabal of scientists. Preston Garvey and the Minutemen are one of the options.
If the player is banished from the Institute for any reason (attacking members inside, declining the initial offer and resolving the Battle of Bunker Hill against the Institute's interests and revealing their role in it), then the Institute becomes inaccessible and the quest line breaks up, together with the Railroad quests. The player can continue with the Minutemen or the Brotherhood.
Garvey will agree to focus forces and attack the Institute if the Minutemen control at least eight settlements. Otherwise, the player will need to build up the Minutemen presence and expand them until that amount is met. Once the Minutemen grow in strength sufficiently, the Institute will take an interest in their activities and decide to wipe them out by taking the Castle.
Talk to Preston Garvey about the Institute
I should talk to Preston Garvey about how the Minutemen can help me destroy the Institute.
Recruit more settlements for the Minutemen
The Minutemen are not strong enough yet to take on the Institute. I should work on building up support across the Commonwealth.
The Minutemen are now strong enough that we can think about taking on the Institute.