How to Add Both Bitbucket and GitHub as Remote Repositories for a Single Git Project and Push to Both?

I'm working on a project where I need to use both Bitbucket and GitHub as remote repositories. I want to be able to push my changes to both platforms simultaneously. I already have a Git repository set up and I am able to push to GitHub, but now I need to add Bitbucket and push to both repositories.

Here are the steps I've taken so far

  1. Initialized the Git repository locally

  2. Added GitHub as a remote repository and have been pushing changes successfully.

git remote add origin https://github.com/username/repository.git
git push -u origin main

Upvotes: 0

Views: 20

Answers (0)

Related Questions