I am a few years, too late. But after spending a whole day searching for the solution found that it is pretty simple.
There are so many answers that layout the Bitbucket login related commands, so I will just write the abstract process, what helped me.
Hoping, this would help someone someday.
- Connect to the source control
- Clone the bare repo (bare repo: does't contain any project files, only git files/folders)
- git clone --bare https:/ /xyz.com/folder/abcd.git
- Move into the directory, which you cloned.
- Add a new origin where you want to push the code. (can be gitlab, github anything)
- git remote add new-origin
- push to the new origin
- git push --mirror new-origin