Skip to main content

Migration plan

Exisiting workspaces in BitBucket

  • Bitbucket has three workspaces
    • gqcclients
    • hydrotrekGQC
    • gqc-ai

Proposed plan

  • The plan is to start with the gqc-ai workspace as it has the least amount of repositories. Most of the repositories from the gqc-ai workspace have been migrated.
    • wildfire-app
      • Moving the wildfire-app repo did not go through. The git history of that repo contains a file larger than 100 MB. This needs to be discussed with Jake.
      • Resolved with steps from this article Migrating & Managing Repos With Large Files
    • pipe-breaks
    • loe-coe app
    • flood-cv
    • toledowq
    • react-fastapi-tigergraph
  • gqcclients
  • hydrotrekGQC
  • All repositories from hydrotrek

Teams

The plan is to create different Teams so that we can have repository level organization for each Team.

NameMembers
CoreSudhir, Jake, Melissa, Deven
HydrotrekSudhir, Jake, Melissa, Deven, Steve
InternAny new interns who join

How to migrate to GitHub

1. Clone a repo from Bitbucket with SSH:
1. git clone foo​
2. cd into that repo
2. Create a repo in GitHub where you wish to migrate the repo from BitBucket
3. Add a new remote to your BitBucket repo using the following command:
1. git remote add upstream git@github.com:foo.git
4. Push code to the new remote:
1. git push upstream master
5. Push other tags, etc:
1. git push --tags upstream
6. Set GitHub as the primary URL:
1. git remote set-url origin git@github.com:<url>.git
7. Final push:
1. git push --mirror
8. Remove BitBucket from remote:
1. git remote rm upstream

To push all branches and tags to the new remote use

git push <neworigin> --tags "refs/remotes/origin/*:refs/heads/*"

⚠️ This will also create a new HEAD branch which would be same as the master or main. So you would need to open GitHub manually and then delete the HEAD branch manually or delete it through the command line.