The World Series champions tweeted they completed the deal with the former New York Mets pitcher on Friday.
Gee would make $250,000 if added to the 40-man roster but is in the minors. He could earn $1.55 million in bonuses for starts, $1.75 million for innings and $700,000 for relief appearances.
Gee made five starts for New York this season before going on the disabled list. He lost his starting job shortly after his return from the DL, pushed out by the addition of rookie Noah Syndergaard. Gee was demoted to Triple-A following a failed spot start on June 14.
He was 0-3 with a 5.90 ERA in eight games - seven starts. Gee chose to become a free agent after the season.
Overall, Gee is 40-37 with a 4.03 ERA in six seasons with New York. He won a career-high 13 games in 2011, his first full season in the majors.
Gee would get $50,000 for 15 starts; $75,000 each for 16-20; $100,000 apiece for 21-25; and $125,000 each for 26-30. His innings bonuses call for $50,000 each for 60 and 70; $75,000 apiece for 80 and 90; $100,000 each for 100 and 110; $125,000 apiece for 120 and 130; $150,000 each for 140 and 150; $175,000 apiece for 160 and 170; and $200,000 each for 180 and 190.
He would earn $100,000 for making 30 relief appearances and each additional five through 60.
If Gee is not on the 40-man roster on March 15, he must be added within 24 hours or released if requested.