{"thread":{"id":"23062","subject":"tracking moved svn repo","startedAt":"2010-03-18T13:23:24Z","lastAt":"2010-03-18T13:23:24Z","messageCount":1,"participants":["Felipe Sánchez"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137092","messageId":"20100318132324.GA14113@daga.cl","threadId":"23062","inReplyTo":null,"subject":"tracking moved svn repo","fromName":"Felipe Sánchez","fromEmail":"blu@daga.cl","sentAt":"2010-03-18T13:23:24Z","receivedAt":"2010-03-18T13:23:24Z","isPatch":false,"sender":{"key":"blu@daga.cl","avatar":null},"body":"In my job, the official SVN repo was moved from one machine to another.\n\nI do all my work on my git repo and, of course, I work on several things in\nparallel, keeping a lot of local branches.\n\nNow a need to hack my git repo to track the SVN repo at its new location.\nI don't want to reclone the SVN repo because it would mean to move all my\nlocal branches one by one.\n\nThe old machine's name is 'pipeline'. The new one is 'condor'.\n\nI did the following:\n\n$ git gc\nCounting objects: 1898, done.\nCompressing objects: 100% (1266/1266), done.\nWriting objects: 100% (1898/1898), done.\nTotal 1898 (delta 1117), reused 1070 (delta 571)\n\n$ git status\n# On branch master\nnothing to commit (working directory clean)\n\n$ git filter-branch --msg-filter 'sed \"s$git-svn-id: svn+ssh://pipeline$git-svn-id: svn+ssh://condor$g' $(cat .git/packed-refs | awk '// {print $2}' | grep -v 'pack-refs')\nCannot rewrite branch(es) with a dirty working directory.\n\nUh? Status finds my working directory clean, but filter-branch seems to\ndisagree.\n\nThanks in advance.\n\n-- \nFelipe Sánchez\n"}]}