San Francisco sent cash considerations to the Astros in the deal.
Brinson was also selected to the active major-league roster.
The post-deadline deal for the former top prospect is allowed because Brinson wasn't on the Astros' 40-man roster.
Brinson has played well for the Triple-A Sugar Land Space Cowboys this season, slashing .299/.356/.574 with 22 home runs and 63 RBIs.
The 28-year-old frequently landed on top-100 lists after the Texas Rangers drafted him in the first round in 2012. He was the main piece of the Miami Marlins' return for Christian Yelich in a 2018 trade involving the Milwaukee Brewers.
However, Brinson hasn't been able to put it together in the majors. He's authored a .199/.248/.323 slash line in 1,111 big-league plate appearances.