备份 BitBucket 上的本地工作目录 - 克隆或推送
我对版本控制非常陌生,所以我的问题非常基本。我正在尝试使用 Mercurial 来达到此目的。我的 Mac 上有一个本地工作目录。我想使用Bitbucket备份该目录中的文件和存储库。
以下命令是否
hg push localDirectoryWithRepo http://bitbucker.org/user_name/repo_on_bitbucket
会将我的文件也传输到 Bitbucket,还是仅传输到存储库?
另外,我尝试了该命令:
hg clone localDirectoryWithRepo http://bitbucker.org/user_name/repo_on_bitbucket
但是,我收到错误消息:
abort: cannot create new http repository
如何最初克隆 bitbucket 上的本地工作目录,然后更新 bitbucket 上的工作目录,以便它与我的本地工作目录相同。
一如既往,非常感谢。
I am very new to version control, so my questions are very basic. I am trying to use Mercurial for the purpose. I have a local working directory on my mac. I want to use Bitbucket to backup the files and the repository in this directory.
Will the following command:
hg push localDirectoryWithRepo http://bitbucker.org/user_name/repo_on_bitbucket
transfer my files also to Bitbucket, or only the repository?
Also, I tried the command:
hg clone localDirectoryWithRepo http://bitbucker.org/user_name/repo_on_bitbucket
however, I get the error saying
abort: cannot create new http repository
How do I clone a local working directory on bitbucket initially and then update a working directory on bitbucket, so that it is the same as my local working directory.
As always, thanks a ton.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mercurial 仅传输已提交的更改。它不会帮助您备份尚未准备好提交的工作副本。
push
命令发送远程存储库没有的每个提交的变更集,而克隆命令将所有这些变更集发送(或获取)到还没有存储库的位置 - 而 bitbucket 则没有。不支持使用 close 在其端创建新的存储库。尽早承诺。经常承诺。经常推。
Mercurial only transfers committed changes. It will not help you backup working copies you aren't ready to commit. The
push
command sends every committed changeset the remote repo doesn't have and the clone command sends (or gets) all of them to a location that doesn't already have a repo -- and bitbucket doesn't support creating new repos on their end using close.Commit early. Commit often. Push often.