On Tue, Nov 25, 2008 at 05:44:28PM +0100, Ondrej Certik wrote: > Hi, > > I would like to export our whole git repository to patches, and then > reconstruct it again from scratch. Following the man page of "git > fast-export": > Perhabs you are looking for git filter-branch, because it seems you want to change the history in some way (e.g. remove a wrongly committed file)? Nevertheless, I expect your shown commands below to procude the same repo again, so you might be on something ... -Peter > $ git clone git://git.sympy.org/sympy-full-history-20081023.git > $ cd sympy-full-history-20081023 > $ git fast-export --all --export-marks=marks > patches > $ cd .. > $ mkdir sympy-new > $ cd sympy-new > $ git init > $ git fast-import --export-marks=marks < ../sympy-full-history-20081023/patches > git-fast-import statistics: > --------------------------------------------------------------------- > Alloc'd objects: 25000 > Total objects: 21355 ( 144 duplicates ) > blobs : 8009 ( 0 duplicates 4529 deltas) > trees : 10627 ( 144 duplicates 9189 deltas) > commits: 2719 ( 0 duplicates 0 deltas) > tags : 0 ( 0 duplicates 0 deltas) > Total branches: 21 ( 26 loads ) > marks: 1048576 ( 10728 unique ) > atoms: 726 > Memory total: 2880 KiB > pools: 2098 KiB > objects: 781 KiB > --------------------------------------------------------------------- > pack_report: getpagesize() = 4096 > pack_report: core.packedGitWindowSize = 33554432 > pack_report: core.packedGitLimit = 268435456 > pack_report: pack_used_ctr = 40706 > pack_report: pack_mmap_calls = 2791 > pack_report: pack_open_windows = 1 / 2 > pack_report: pack_mapped = 26177739 / 35513414 > --------------------------------------------------------------------- > > > > However, the repository is very different to the original one. It > contains only 191 patches: > > $ git log --pretty=oneline | wc -l > 191 > > and it only contains couple files. Compare this with the original repository: > > $ git log --pretty=oneline | wc -l > 2719 > > What am I doing wrong? Is there some other way to do it? I also tried > "git format-patch" and "git am" and that almost works, only it changes > hashes. Is there some way to tell "git am" to preserve the hash? > > Thanks, > Ondrej -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html