How to GIT PUSH changes to Github and BitBucket Simultaneously

If you are using Github but you also need to keep a copy of your work in another Git Service Provider like BitBucket, follow the below steps.

Assuming you have created a new repo in BitBucket.

  • Open root directory of your project in the terminal
  • Run this command
    git remote -v show
  • It will show the GIT repo for Fetch and Push actions for Github
  • Now, run this command
    git remote set-url origin –add https://<USERNAME>:<PASSWORD><USERNAME>/<REPO>.git
  • When you check again (git remote -v show) the BitBucket repo is also added for the action Push. Check the reference image attached below.
  • When you git push, your code is pushed to both Github and BitBucket Repositories
  • You can also check the config file of the mentioned changes in your root directory of your repository


Under Construction! :D