Close Git repository after operation is done