我不是GIT专家所以我需要一些关于这个设置的帮助我正在进行的项目。所以基本上这就是我需要的:
git pull
始终使用Github主项目的最新更改来更新CORE?我使用SmartGit作为主客户端,但也有git命令行。
对此有何帮助?
答案 0 :(得分:14)
创建空的BitBucket仓库后,您可以
git clone https://github.com/user/yourRepo
cd repo
git remote rename origin upstream
git remote add origin https://yourAccount@bitbucket.org/yourAccount/yourRepo
git push --mirror
然后确保master
将从bitbucket
repo(upstream
作为远程名称引用原始GitHub回购提取)
git checkout master
git branch -u origin/master
git push.default matching
git push
将推送到bitbucket repo(origin
),但您需要git pull upstream
从原始GitHub存储库中提取/更新。
默认情况下,您将使用BitBucket(就像所有其他开发人员克隆新的repo一样),但开发人员可以随时添加对原始GitHub存储库的引用(远程)。