Skip to content

Instantly share code, notes, and snippets.

@MoritzBuetzer
Last active January 8, 2019 08:27
Show Gist options
  • Save MoritzBuetzer/73f97de559671436f023ae2a32c8a1fe to your computer and use it in GitHub Desktop.
Save MoritzBuetzer/73f97de559671436f023ae2a32c8a1fe to your computer and use it in GitHub Desktop.
Quick & dirty script to migrate Bitbucket Repo to GitHub
#!/usr/bin/env bash
projectname=$1
${bitbucketUsername}=HansMuster
${githubUsername}=HansMuster
git clone [email protected]:${bitbucketUsername}/${projectname}.git
cd ${projectname}
git remote set-url origin https://github.com/${githubUsername}/${projectname}.git
git push --mirror
@MoritzBuetzer
Copy link
Author

MoritzBuetzer commented Jan 8, 2019

Usage

  1. create GitHub Repo
  2. ./migrate.sh reponame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment