the corner office : tech blog

a tech blog, by Colin Pretorius

Combining git repos

In the good old days before maven all my projects would be standalone in CVS modules. I wanted to combine a few CVS modules which I'd recently imported into a single maven project, with a single git repo. This page (which I'd linked to before) has the details. I chose the git filter-branch option since it looked relatively painless.

Using the monster git filter-branch command mentioned on that page, I got the error:

Cannot rewrite branch(es) with a dirty working directory.

A quick google found this page which mentions the issue and suggested making sure that git status reported "nothing to commit". My problem was that git status was saying that, and yet I still got the error. What I actually needed to do was run

git add .

After that git status still reported "nothing to commit" (unsurprisingly), but filter-branch now ran fine.

{2010.07.09 16:22}

« Lightweight Linux distros

» Links 2010.07.14