Goal
Currently application code is staged into GitHub repository and the requirement is to migrate the code to Bit Bucket repository.
Pre-Requisites
- Github Repo: https://github.com/dptrealtime/java-login-app.git
- Create two Bitbucket accounts to follow the best practices (Developer1 & Developer2 accounts)
- Create private Bitbucket repository and add Developer1 and Developer2 as collaborators.
Migration
- Clone GitHub repository
- Clone Bitbucket repository as Developer1
- Migrate the code from Github repository (local master) to Bitbucket repository (local master)
- Follow branching strategy and commit the code to “feature” branch of Bitbucket repository.
- Raise Pull Request to merge the code from Feature branch to Master branch and add Developer2 as reviewer.
- Login to Bitbucket as Developer2 then approve and merge the PR using “no fast forward” merge strategy.
Verification
- Verify that the code is now showing in the Bitbucket repo.
Note: Explore various other options to migrate the code from Github to Bitbucket and add the possibilities in the comments.
© Edwiki Trainings – Click HERE If you are interested to learn more on Cloud & DevOps stack.
6 comments
I Completed the assignment. My solution can be found here
https://github.com/yemisi/Valaxytraining/blob/main/Github%20to%20bitbucket%20migration%20Assignment%204.pdf
I came across one solution online which uses an import wizard on bit bucket but that method directly commits from the source repo to the bit bucket master branch which doesnt fit the requirement.
I also came across another solution that allows for the commit history to be mirrored to the destination repo but i wasn’t sure how to fit that into the given requirements of our assignment with a feature branch being used to commit to the master.
My solution copies the code , then pushes and merges via a feature branch with a pull request to the master branch
I completed the assignment with below step.
I clone the Bitbucket repo to Local master branch then created the feature branch. In Feature branch clone the git Project. I push the Feature branch to Bitbucket then created Pull request from DEV1 user IN Dev2 bucket approve the request and merge the request with Dev2 user.
Followed below steps to complete the assignment:
1. Created two seperate bit bucket account (Dev1 Dev2) and added dev2 as collobarator.
2. Cloned bitbucket repo of DEV1 account to local git master branch.(used folder project)
3. cloned github repo to local git master branch in different folder (used folder dev1)
4. Copied content from project/java-login-app to Dev1/java-login-app
5. created branch feature and switched to feature branch , then used add and commit command .
6. Now pushed the files to bit bucket feature branch
7. Now created pull request from dev1 where dev2 is reviewer.
8.logged in as dev2 and approved the request and merged using no fast forward merge startegy.
I was able to complet the assignement by creating a dveloper 1 as owner of bitbucket
clone the bitbucket repository
ADD DEVELOPER 2 AS COLLABORATORS
created branch feature pushed the code to feature branch
Merge the code from feature to master branch
dveloper2 reviewed and approved.
I HAVE COMPLETED THE TASK SUCCESSFULLY.