Skip to content

Instantly share code, notes, and snippets.

@josejuansanchez
Last active April 6, 2021 13:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save josejuansanchez/b2f757ce0d3effca47ce to your computer and use it in GitHub Desktop.
Save josejuansanchez/b2f757ce0d3effca47ce to your computer and use it in GitHub Desktop.
How to import the p2psp bazaar repository in GitHub

1. Install bzr and bzr-fastimport

sudo apt-get install bzr
sudo apt-get install bzr-fastimport

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