Migration plan
Exisiting workspaces in BitBucket
- Bitbucket has three workspaces
gqcclientshydrotrekGQCgqc-ai
Proposed plan
- The plan is to start with the
gqc-aiworkspace as it has the least amount of repositories. Most of the repositories from thegqc-aiworkspace have been migrated.-
wildfire-app- Moving the
wildfire-apprepo did not go through. Thegithistory 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
- Moving the
-
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.
| Name | Members |
|---|---|
| Core | Sudhir, Jake, Melissa, Deven |
| Hydrotrek | Sudhir, Jake, Melissa, Deven, Steve |
| Intern | Any 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.