move master branch from one repo as the master branch to another repo, without merging

  • old repo is on Github, new repo is on Bitbucket
  • old site was built with Jekyll, new site is built with Hugo

  • create a new branch, checkout from within master

git checkout -b jekyll
git push -u origin jekyll

delete everything inside the master of old repo

git checkout master
rm -rf ./*
git remote add bitbucket
git remote update
git merge --allow-unrelated-histories bitbucket/master