顯示具有 Poole 標籤的文章。 顯示所有文章
顯示具有 Poole 標籤的文章。 顯示所有文章

2015年5月19日 星期二

Git 使用多個 repository

以建立 GitHub Pages 為例
複製 GitHub 上建立的 repo
$ git clone git@github.com:enhao/enhao.github.io.git cheatsheet
$ cd cheatsheet
增加和更新 Lanyon 的 repository
$ git remote add lanyon git@github.com:poole/lanyon.git
$ git remote update
$ git branch -a
* master
  remotes/lanyon/gh-pages
  remotes/lanyon/master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
合併 Lanyon 的 repo 到 master
$ git checkout master
$ git merge remotes/lanyon/master
上傳到 GitHub Pages 的 repo
$ git push origin master
上傳到增加的 repo
$ git push lanyon master
參考