Add function to initialize a repository