bitbucket的简单使用

本文介绍了bitbucket.org代码库的使用,包括申请账号、权限设置等。使用git操作时,bitbucket的https在国内被墙,可通过写入host文件解决。使用git push报错,提示push.default设置问题,还给出了不同设置的区别及解决参考网址,最后提到assembla是更好的私有git库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境:win7,国内 时间:2013/1/10

bitbucket.org 是很不错的,不限制使用容量,只限制了5个人协同开发。

简单的申请了两个账号来测试这个代码库的功能。

Chinesejies(chinesejie@foxmail.com) + chinesejie(chinesejie@qq.com)

一般建立的库都是默认私有的,可以在首页-Manage Account-Group下面添加群。这样你所有的库都可以通过Group设置来权限控制。Group设置需要对方同意。

clip_image002

但是我们想要将一个库单独出来分配权限,那就是进入建立的库,对这个库进行share设置。

clip_image004

简单的设置结束之后,就是使用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中,相对来说安全性差了点。

这个错可以参照下面网址:

http://www.tcreator.info/webSchool/itTopics/git-config-push-default-matching.html

相比较而言,这个rp真心比assembla差、 assembla 是更好的一个私有git库,很轻松上手,不用我写教程,也没被墙掉。

--end author:chinesejie@qq.com 2013/1/10

转载于:https://my.oschina.net/liangshao/blog/101812

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值