环境:win7,国内 时间:2013/1/10
bitbucket.org 是很不错的,不限制使用容量,只限制了5个人协同开发。
简单的申请了两个账号来测试这个代码库的功能。
Chinesejies(chinesejie@foxmail.com) + chinesejie(chinesejie@qq.com)
一般建立的库都是默认私有的,可以在首页-Manage Account-Group下面添加群。这样你所有的库都可以通过Group设置来权限控制。Group设置需要对方同意。
但是我们想要将一个库单独出来分配权限,那就是进入建立的库,对这个库进行share设置。
简单的设置结束之后,就是使用git了。最简单的就是git clone,但是发现bitbucket的https能在浏览器访问,但是在git下面却有问题,绝对是在国内被墙了。
这时候老招式,ping bitbucket.org,得出ip,写入host文件。搞定。还嫌弃速度慢的就是翻+墙软件。
接着使用git push时候,报错了:
$ git push
warning: push.default is unset; its implicit value is changing inGit 2.0 from 'matching' to 'simple'. To squelch this messageand maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git)
通常,这是很多 Linux 或者说开源社区贴心的地方,主动告诉你,“注意了,我们发布了一个新版本,有些地方和之前的不太一样,需要你自己动手改一下”。。。只是,为什么不直接给出一条简单明了的指令呢?
git config push.default simple
这样执行git push的时候,只会push当前的branch,如果设置为matching的话,会push所有的有改动的branch到相应的repository的ref中,相对来说安全性差了点。
这个错可以参照下面网址:
相比较而言,这个rp真心比assembla差、 assembla 是更好的一个私有git库,很轻松上手,不用我写教程,也没被墙掉。
--end author:chinesejie@qq.com 2013/1/10