Rey*_*rPM 10 git github bitbucket
我不是GIT专家所以我需要一些帮助来完成我正在进行的项目的设置.所以基本上这就是我需要的:
git pull一直使用Github主项目的最新变化来更新CORE?我使用SmartGit作为主客户端,但也有git命令行.
对此有何帮助?
Von*_*onC 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
Run Code Online (Sandbox Code Playgroud)
然后确保master从bitbucketrepo中拉出(upstream作为远程的名称引用原始的GitHub repo)
git checkout master
git branch -u origin/master
git push.default matching
Run Code Online (Sandbox Code Playgroud)
该git push会推到位桶回购(origin),但你需要git pull upstream从最初的GitHub库拉/更新.
默认情况下,您将使用BitBucket(就像所有其他开发人员克隆新的repo一样),但开发人员可以随时添加对原始GitHub仓库的引用(远程).
| 归档时间: |
|
| 查看次数: |
3862 次 |
| 最近记录: |