====== Mercurial (hg) ====== === Extract parts of a repository into another repository === .. and also keep the history! Step 1: use the [[http://mercurial.selenic.com/wiki/ConvertExtension|convert extension]] for extraction Step 1a: [[http://mercurial.selenic.com/wiki/UsingExtensions|Enable Extension]] Step 1b: Create a filemap include repo_subdir exclude repo_subdir/bigfile.csv rename repo_subdir . Step 1c: hg convert --filemap /path/to/filemap /path/to/old/repo /path/to/extracted/repo Step 2: Pull the created repo into your current repo cd /path/to/repo hg pull /path/to/extracted/repo