代码托管 bitbucket.org

Posted by wxianfeng Fri, 04 Mar 2011 05:54:00 GMT

想把个人的一个项目放到 github上的 ,但是发现不能设置为 private的 , private 是付费用户 。。。

于是把代码 托管到了 https://bitbucket.org ,bitbucket.org 使用的是 hg 版本控制 ,也叫 mercurial , 和 git 很相似 , 也是分布式版本控制系统 关键是 可以设置为 private 的 ,并且free用户 还可以有5个人的协同开发

使用:

0 , 上传 publickey

1,config 配置用户

>vim ~/.hgrc
[ui]
username = wxianfeng <wang.fl1429@gmail.com>
verbose = True

2,init 初始化项目

>cd project
>hg init

3,add files 添加文件

>hg add .

4,commit file to config commit 文件 ,这时只是放到了 config中 ,并没有到服务器上,和 svn 不一样

>hg commit -m "import project"

5,push 上传

>hg push https://bitbucket.org/user/project

SEE:

http://www.oschina.net/p/mercurial
http://www.infoq.com/cn/news/2010/10/atlassian-bitbucket