We have been using Bazaar for source
control at work for nearly five
years. We are about to Open Source most of our
core technologies and decided that GitHub is the
best way to encourage community participation. We have signed up for a
Silver plan at GitHub and will migrate all our Bazaar repositories to Git.

I have a few personal projects in Bazaar repositories hosted on
Launchpad. I decided to migrate my projects
to GitHub in order to learn the migration process. What follows is an
overview of how I did it using a fresh virtual machine running Ubuntu 10.04
LTS Server. I used a little project of mine called nullserv in the
examples below.

Thanks to Chris for pointing out git filter-branch in the comments. If you
need to modify the author info in your repository history, you can do so with
this, just replace the names and email addresses accordingly.

Beware This should not be performed on a
repo that has been shared with others. Use at your own risk.

Resume here, regardles of whether you deleted any files from the commit history or not.
Remove everything from the index.

git rm --cached -r .

Write both the index and working directory from git’s database.

git reset --hard

Prepare to make a commit by staging all the files that will get normalized.
This is your chance to inspect which files were never normalized. You may
get lots of messages like: warning: CRLF will be replaced by LF in file.

git add .
git commit -m "Forced line endings to eol=lf"

Agressively pack the repository.

git gc --aggressive --prune=now

At this point you have a migrated git repository. You can poke about a check that
everything is present and correct.

Optionally you can create a new GitHub repository using their API. Replace USER
and PASS with your GitHub login crednetials.