rebuild repository structure