Duplicate repository with no history - Kiln Knowledge Exchange most recent 30 from http://kiln.stackexchange.com 2013-05-23T07:58:32Z http://kiln.stackexchange.com/feeds/question/3570 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://kiln.stackexchange.com/questions/3570/duplicate-repository-with-no-history Duplicate repository with no history idbentley 2011-04-27T12:58:38Z 2011-04-27T13:48:50Z <p>Hi all,</p> <p>I'm looking to do something quite simple - I'd like to duplicate a repository, but not save any of its history. </p> <p>I suspect I might be able to simply delete the .hg folder from my local repository, and then clone a new empty repo into that directory, and then <code>hg add</code> all the files to the new repository.</p> <p>This however is slightly convoluted, and I wondered if there is a simpler way.</p> <p>Thanks, idbentley</p> http://kiln.stackexchange.com/questions/3570/duplicate-repository-with-no-history/3573#3573 Answer by Na'Tosha Bard for Duplicate repository with no history Na'Tosha Bard 2011-04-27T13:48:50Z 2011-04-27T13:48:50Z <p>I would just delete the .hg directory, run:</p> <pre><code>hg init hg add hg commit --message "initial import" hg push your-empty-remote-repo </code></pre>