A father of five children appeared on video link from prison after he admitted stealing a bicycle last week.
Carl Moore, 32, of no fixed address, was sent to prison for six weeks last week after admitting the offence.
He denies two charges of breaching a restraining order and his solicitor asked magistrates to grant Moore bail when he is released from prison before his trial date on October 15.
Moore is accused of breaching a restraining order on August 5 when he allegedly went to his former address in Ivatt Court and slept in the shed in the back garden. He is also accused of breaching the order by attending the same address on August 12.
Solicitor Chris Pye-Smith said his client appeared in court on Thursday, while in custody, and admitted the theft of a pedal cycle and breach of a suspended sentence order handed to him for an assault. Mr Pye-Smith said Moore received six weeks in custody but will only serve three of those, which means he will be released before his trial next month.
Mr Pye-Smith asked the magistrates to grant Moore technical bail so that he could be given his freedom until the trial.
Prosecutor Marie Stace said she would be happy for Moore to be granted conditional bail upon his release from prison.
The magistrates agreed and granted Moore bail upon his release on condition he did not go to Ivatt Court or Sturrock Court or the alleyway that runs behind them and did not contact one named person.