User Tools

Site Tools


scm:move_bitbucket_git_repo_to_github

Move Existing Git Repository to Github

This process assumes you have access to the Agtek Github account. It also assumes you have access to the Agtek Bitbucket server. The result will be that all the source code as well as all the branches and history are moved into a Github repository.

Steps

  • Create an empty repository on Github. The naming convention for Android is <App>_Android. Make sure to choose agtek as the owner and set as a “private” repository so no one outside Agtek can see it. Also do not check the “Initialize this repository with a README”.
  • Next this page will appear. Notice the https path showing under Quick Setup. You will need this path later on. Choose “Settings” on the far right.
  • Now we want to add a team so the Agtek development team can see your repository. Select “Collaborators & teams” on the left side to get to this screen. Once there select “Add a team”. From the dropdown select “Developers”. Next change the permissions to “Write” from “Read” using the dropdown. You are done with this for now.
  • Clone the repository to move from Bitbucket into your local space
  • cd <Cloned Repository>
  • There is probably a better way, but you need to checkout all the branches so you have them local.
  • git remote set-url origin https://github.com/agtek/<Created Repo>.git (This is the path from above and can be copied from Github)
  • git push origin –all (Pushes all the branches)
  • git push –tags origin (Pushes all the tags)

You are done! Now make sure you don't continue to use Bitbucket. We will clean all that up at some point.

scm/move_bitbucket_git_repo_to_github.txt · Last modified: 2019/08/19 18:33 by timm