I'm not a GIT expert so I need some help on this setup for a project I'm working on. So basically this is what I need:
git pull
all the time to mantain CORE updated with latest changes from Github main project?I'm using SmartGit as main client but also have git command line.
Any help on this?
Once you have created an empty BitBucket repo, you can
git clone https://github.com/user/yourRepo
cd repo
git remote rename origin upstream
git remote add origin https://[email protected]/yourAccount/yourRepo
git push --mirror
Then make sure master
will pull from the bitbucket
repo (upstream
being the name of the remote referring to the original GitHub repo)
git checkout master
git branch -u origin/master
git push.default matching
The git push
will push to the bitbucket repo (origin
), but you need git pull upstream
to pull/update from the original GitHub repo.
By default, you will be working with the BitBucket one (like all other developers cloning that new repo), but a developer can add at any moment a reference (remote) to the original GitHub repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With