Skip to content

Instantly share code, notes, and snippets.

@intika
Forked from josejuansanchez/bazaar-to-git.md
Last active February 13, 2020 04:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intika/15b0491bf0ee03c96481908afd05392e to your computer and use it in GitHub Desktop.
Save intika/15b0491bf0ee03c96481908afd05392e to your computer and use it in GitHub Desktop.
How to import the p2psp bazaar repository in GitHub

1. Install bzr and bzr-fastimport

dnf install bzr
pip install email fastimport

then install this rpm with --nodeps python-module-bzr-fastimport-0.13.0-alt6.noarch.rpm

2. Get the trunk branch from launchpad

bzr branch lp:p2psp 

3. Inside the directory of your local branch do the following

git init                                        # Initialise a new git repo
bzr fast-export --plain . | git fast-import     # Import Bazaar history into Git

rm -rf .bzr                                     # This file is unused in git
rm -rf .bzrignore                               # This file is unused in git

git add -A                                      # Add the files to git
git commit -m "Imported bazaar to git"          # Do a commit

4. Create the repository on GitHub

In this step you will get the URL of the repository.

5. Push the repository from the command line

Remember: You have to change the URL, and use the URL of your repository.

git remote add origin https://github.com/josejuansanchez/p2psp.git
git push -u origin master

6. Result

You can check the result in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment