git的多仓库使用

1970阅读 0评论2014-04-08 bailiangcn
分类:LINUX

    最近在BAE上写代码,感觉很好,关键是作为Linuxer非常的熟悉环境。但是在BAE上面git不能支持分支、tag等特性。所以使用坚果云配合BAE来实现git的多仓库应用。
首先建立正常的BAE开发环境(参考文档),环境是:

  1. $ git remote -v
  2. origin    https://git.duapp.com/appid***** (fetch)
  3. origin    https://git.duapp.com/appid***** (push)
一、建立坚果云库(参考文档)

  1. $ mkdir -p ~/Nutstore/git/lovedq
  2. $ pushd ~/Nutstore/git/lovedq
  3. $ git init --bare
  4. $ popd
  5. $ git remote add nut ~/Nutstore/git/lovedq
  6. $ git push nut master
二、配置一键推送多个库
打开 ~/.gitconfig 文件,添加如下内容
点击(此处)折叠或打开
  1. [remote "all"]
  2. url = https://git.duapp.com/appid******
  3. url = /home/bl/Nutstore/git/lovedq
这样,使用git push all即可一键Push到多个远程仓库中。
三、保存登录名密码

      在 ~/.netrc 中,添加如下内容,登陆不再需要密码

  1. machine git.duapp.com
  2. login ******
  3. password *******



上一篇:2003 vba 备忘
下一篇:ubuntu 14.04安装记录