How to migrate from Bitbucket or GitHub

If you are moving to Beanstalk and have previously used GitHub, Bitbucket, or another code hosting service, here are a few things to think about when making the switch.

Has your entire team pushed their latest updates to the remote repo?

If not, ask everyone to do so before proceeding with the migration for the smoothest transition.

Do you have local copies?

If not, do a full clone of your remote repository to your local machine. You can do this with the following command:
git clone remote-repo.path desired-repo-name

Do you have an outdated local copy?

If so, you will want to do a fresh pull of all the branches for your given repository from your current code hosting service. To do so, use the following command:
git pull --all
Please note, this will only update local branches that are currently set to track a remote branch in the remote repository.
If a branch exists on the remote repo, but not locally, this command will need to be preceded by a command that creates a branch in your local repo for all the existing branches in your remote repo. You can achieve that with the following command:
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
Once those two commands are completed, your local repo should be fully updated.

Add your files to Beanstalk

Once you have things updated locally, you can start to push your files to the remote repo in Beanstalk. You can start by creating the new repositories in Beanstalk, then pushing changes from your local machine by adding a remote to the local repo.
We walk through that step at the bottom of this page.
Note: once this is complete, you can also remove any remotes you have pointing to your old GitHub or Bitbucket account.

Beanstalk + GitHub/Bitbucket?

Did you sign up for Beanstalk hoping it would work with your current code hosting service? If so, this will not work. Beanstalk is a full fledged workflow development platform from which you can host, review, and deploy your code. As such, it offers many of the same benefits as GitHub and Bitbucket and so is not used side by side with either of those (it also offers a few other features that they do not, such as code reviews and deployments).
But if you simply need a deployment service to use in tandem with your GitHub or Bitbucket account, Beanstalk’s little brother DeployBot can help. It connects to your GitHub, Bitbucket, or self hosted Git repository to give you powerful automated deployments.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us