Retna Digital

Gossip Girl star Kelly Rutherford has settled her contentious custody battle with her ex.

Check out Hollywood's ugliest divorces.

She and German businessman Daniel Giersch will share joint legal and physical custody of their two children, son Hermes, 2, and daughter Helena, who was born in early June.

Check out pics of Hollywood's hot moms on the go.

Rutherford -- who filed for divorce in January after two years of marriage -- and Giersch will temporarily relocate from California to New York while she films the hit CW show, reports. From July 30 through April 5, she will live in NYC while he will reside in the Hamptons.

Find out what other stars are pregnant.

According to court documents, both parents will also attend co-parenting counseling sessions.

The settlement comes three months after the couple fought in court about whether Hermes should be potty-trained. When asked then if she and Giersch could have an amicable relationship, Rutherford told reporters: "I don't see it."