I\'m working on a project based on CakePHP, that\'s hosted on GitHub. My project is being hosted on Bitbucket
If you want to keep your repo up to date, use two remotes: Github (upstream
) and Bitbucket (origin
) like this:
# Clone original CakePHP source code from Github
git clone --mirror https://github.com/cakephp/cakephp
cd cakephp
# Rename remote from `origin` to `upstream`
git remote rename origin upstream
# Add your Bitbucket repo (this is where your code will be pushed)
git remote add origin https://bitbucket/your/repo.git
# Push everything to Bitbucket
git push --mirror origin
To pull updates to CakePHP from Github:
git pull upstream master
To push your code changes to Bitbucket:
git push origin master