The court will decide based on the best interests of the child who should have custody. However, a writ of habeas corpus cannot be brought to modify custody.In all writs of habeas corpus sought on account of the detention of a spouse or child, the court on hearing all the facts may exercise its discretion. Habeas petitions are generally filed in superior court in the county where the inmate is being held. All prisoners must use only the financial affidavit forms available from the Office of the Clerk of this Court. Please note that under O.C.G.A. § 9-14-45, service of a petition of habeas corpus shall be made upon the person having custody of the petitioner. Superior courts have exclusive jurisdiction of state habeas corpus actions. A petition brought under this article must be filed in the superior court of the county in which the petitioner is being detained. A petition brought under this article must be filed in the superior court of the county in which the petitioner is being detained. In Georgia, a Habeas Corpus attorney is vital.