Duplicate repository with no history - Kiln Knowledge Exchange most recent 30 from http://kiln.stackexchange.com2013-05-23T07:58:32Zhttp://kiln.stackexchange.com/feeds/question/3570http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://kiln.stackexchange.com/questions/3570/duplicate-repository-with-no-historyDuplicate repository with no historyidbentley2011-04-27T12:58:38Z2011-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#3573Answer by Na'Tosha Bard for Duplicate repository with no historyNa'Tosha Bard2011-04-27T13:48:50Z2011-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>