A man accused of trying to kill his girlfriend by striking her on the head with a hatchet is to be released from custody, a High Court judge ruled today.