备份 BitBucket 上的本地工作目录 - 克隆或推送

发布于 2024-10-02 05:51:55 字数 565 浏览 1 评论 0原文

我对版本控制非常陌生,所以我的问题非常基本。我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉宸 2024-10-09 05:51:55

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文