{"thread":{"id":"29148","subject":"migrating from svn: How to clean up history?","startedAt":"2011-12-13T14:53:09Z","lastAt":"2011-12-16T23:11:08Z","messageCount":3,"participants":["Hartmut Goebel","Jakub Narebski","Thomas Ferris Nicolaisen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"181042","messageId":"4EE766D5.5040702@goebel-consult.de","threadId":"29148","inReplyTo":null,"subject":"migrating from svn: How to clean up history?","fromName":"Hartmut Goebel","fromEmail":"h.goebel@goebel-consult.de","sentAt":"2011-12-13T14:53:09Z","receivedAt":"2011-12-13T14:53:09Z","isPatch":false,"sender":{"key":"h.goebel@goebel-consult.de","avatar":null},"body":"Hello,\n\nI'm one of the developers of www.pyinstaller.org, a tool for \nbundling/packagin Python scripts and al required modules into a single \nexecutable for easy distribution. We are in the process of migrating \nfrom Subversion to git.\n\nOur SVN-Repo contains some stuff we do not want or do not need in the \ngit repo. How can we clean this up?\n\n1) Useless commits e.g. tagging -> I want to remove these\n2) copy or move mistakes -> I want to \"correct\" the copy\n\nExample for 1): This occurs e.g. if this is done\n\nsvn cp trunk tags/v0.1 -m 'release v0.1' <<<--- this on in not needed\nsvn rm tags/v0.1 -m 'release v0.1'\nsvn cp trunk tags/v0.1 -m 'release v0.1'\n\nIn this case I want to completely eliminate the first commit.\n\nExample for 2): This occurs e.g. if this is done\n\nsvn cp trunk tags/v0.1 -m 'release v0.1'\nsvn cp trunk tags/v0.1 -m 'release v0.1' <<-- actually copies to \ntags/v0.1/trunk\n\nIn this case I want to change eliminate the first commit (this is he \nsame as case 1) and rewrite commit 2 to rewrite the path.\n\nI already did some experiments with `git filter-branch` without success. \n(I manage renaming the tags, though.)\n\nAny hints how to to this clean-up?\n\n-- \nSchönen Gruß - Regards\nHartmut Goebel\nDipl.-Informatiker (univ.), CISSP, CSSLP\n\nGoebel Consult\nSpezialist für IT-Sicherheit in komplexen Umgebungen\nhttp://www.goebel-consult.de\n\nMonatliche Kolumne: http://www.cissp-gefluester.de/\nGoebel Consult ist Mitglied bei http://www.7-it.de\n"},{"id":"181047","messageId":"m362hkh5em.fsf@localhost.localdomain","threadId":"29148","inReplyTo":"4EE766D5.5040702@goebel-consult.de","subject":"Re: migrating from svn: How to clean up history?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-12-13T15:12:21Z","receivedAt":"2011-12-13T15:12:21Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Hartmut Goebel <h.goebel@goebel-consult.de> writes:\n\n> I'm one of the developers of www.pyinstaller.org, a tool for\n> bundling/packagin Python scripts and al required modules into a single\n> executable for easy distribution. We are in the process of migrating\n> from Subversion to git.\n> \n> Our SVN-Repo contains some stuff we do not want or do not need in the\n> git repo. How can we clean this up?\n> \n> 1) Useless commits e.g. tagging -> I want to remove these\n> 2) copy or move mistakes -> I want to \"correct\" the copy\n[...]\n\n> Any hints how to to this clean-up?\n\nYou can try \"gitsvnparse\" command from 'reposurgeon' tool to\nautomatically correct some conversion mistakes, and use this tool to\ndo further fixes\n\n  http://www.catb.org/esr/dvcs-migration-guide.html\n  http://www.catb.org/~esr/reposurgeon/\n\nHTH\n-- \nJakub Narebski\n"},{"id":"181350","messageId":"CAEcj5uWVUZ1BiGN3Aj=i9-tWo-vmBPcGyQzq8vGy-qsMpZu9Ug@mail.gmail.com","threadId":"29148","inReplyTo":"4EE766D5.5040702@goebel-consult.de","subject":"Re: migrating from svn: How to clean up history?","fromName":"Thomas Ferris Nicolaisen","fromEmail":"tfnico@gmail.com","sentAt":"2011-12-16T23:11:08Z","receivedAt":"2011-12-16T23:11:08Z","isPatch":false,"sender":{"key":"tfnico@gmail.com","avatar":"https://gravatar.com/avatar/628cf28a25ca4c596c7284562100f70f0ef908bcbfadd4da1eb3d48c23658d01?d=mp&s=160"},"body":"> I already did some experiments with `git filter-branch` without success. (I manage renaming the tags, though.)\n>\n> Any hints how to to this clean-up?\n\nThere are some examples of how to use filter-branch to remove empty\ncommits, and some other handy tips on this page:\n\nhttp://thomasrast.ch/git/git-svn-conversion.html\n"}]}