GIT migration
From BitBucket 2 GitHub
Last updated
From BitBucket 2 GitHub
Last updated
Make sure you have signed-up to , if not reach out to IT
Update the following details in the here
BitBucket Repo name, URL
CodeOwner, Team-name, GitHub IDs of the developers who need write access
Based on the Step 0 Information DevOps will ensure the repos are present in GitHub, so that the dev can push the code changes from their local machine as per step 2
To create the GitHub team with the specific Devs and Branch Protection rules.
Each dev owners of the repos, Pull the latest code from BitBucket into your local machine either by git clone or git pull and add the "github" as an alternate remote.
Option 1: If you do not have a local repo, here the vector repo is taken as example, you replace your respective repo name .
Option 2: You already have a BitBucket repo local copy
2. Now let's do little cleanup on the existing branches and standardise it
Ensure that we have the standard branch names as. "master", "stage", "develop", all small cases. Incase in the existing BB repo, the branch names are either of the following, "Develop", QA, etc. You can map it correctly using the any of the (or) all of the following commands depending on the situation.
Now, as a next step, lets cleanup the existing unwanted repos before pushing to GitHub, the following command retains only "master", "stage" and "develop", all the remaining branches will be restricted from pushing to github.
Note: if the removal of the branches are taking too much time, you can abort it by Ctl+C or Ctl+cmd
3. All done, let's push required branches and tags to GitHub Repository using below commands
Once the code is migrated to GitHub, you need to create a file at the root of the repo named "CODEOWERS", you may have to copy this file across required branches with either same or different reviewers. Below is the sample file.
SREs to update the git urls of the jobs to github