No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4805ae2 Jun 5, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Init Jun 5, 2018 Init Jun 5, 2018


Repo on GitHub Repo on GitLab Repo on BitBucket

Keep in sync your Git repos on GitHub, GitLab & Bitbucket without efforts

Once Install some CLI tools

brew install hub
gem install gitlab
pip install bitbucket-cli

Note: be sure to have tokens as env var, see the beginning of this post for details.

(Also, configure a git alias that will do pull --all if you want to pull all remote by default.)

For each repos

  1. Export your username (assuming you have the same on all platforms)
  1. For new repo (if your repo already exist on GitHub, go to step below.)
export GIT_REPO_NAME=your-repo
git init
hub create
  1. For existing GitHub repo
export GIT_REPO_NAME=$(basename $(pwd))
gitlab create_project $GIT_REPO_NAME "{visibility_level: 20}"
bb create --protocol=ssh --scm=git --public $GIT_REPO_NAME

Then, to add remotes

git remote set-url origin --add${GIT_USER_NAME}/${GIT_REPO_NAME}.git
git remote set-url origin --add${GIT_USER_NAME}/${GIT_REPO_NAME}.git
git remote add origin-gitlab${GIT_USER_NAME}/${GIT_REPO_NAME}.git
git remote add origin-bitbucket${GIT_USER_NAME}/${GIT_REPO_NAME}.git
  1. Check that everything is ok
git remote -v

You should get something like

origin  ssh:// (fetch)
origin  ssh:// (push)
origin  ssh:// (push)
origin  ssh:// (push)
origin-bitbucket        ssh:// (push)
origin-bitbucket        ssh:// (fetch)
origin-gitlab   ssh:// (fetch)
origin-gitlab   ssh:// (push)

😇 Now you can just git push and git pull --all!

Bonus: badges

You can add some nices badges to show the redundancy on your project README

[![Repo on GitHub](](
[![Repo on GitLab](](
[![Repo on BitBucket](](

Adjust YOU/YOUR-REPO to your need in the markdown.

It will look like this

Repo on GitHub Repo on GitLab Repo on BitBucket