1,用服务器上的空仓库生成.hg文件
hg clone your-url
2,将生成的.hg目录拷到要上传的本地仓库目录下(初始时hg init)
3,添加要上传的文件到本地仓库
hg add
4,将代码提交到本地仓库
hg commit
5,将本地仓库的代码提交到服务器
hg push your-url
可能遇到的问题汇总:
Q:中止: 此处没有水银版本库(没有找到 .hg)!
A:hg init
Q:
yu@MCW-xnYu:~/memcache/Bitbucket_repository$ hg clone ssh://hg@bitbucket.org/***/***
The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)? yes
remote: Warning: Permanently added 'bitbucket.org,207.223.240.182' (RSA) to the list of known hosts.
remote: Permission denied (publickey).
中止: no suitable response from remote