如何将文件从 svn 存储库获取到临时或生产系统?

发布于 2024-10-17 06:50:07 字数 322 浏览 1 评论 0原文

我刚刚开始玩版本控制。我已经在我的 Mac 上安装了 svn 和 svnX,并在 assembla.com 上设置了一个带有 Subversion 存储库的免费项目。

到目前为止,我还没有将任何文件上传到我的 SVN 存储库。我花了一天的大部分时间阅读有关该主题的内容并弄清楚该怎么做。

我已经开始掌握不同的概念,但我想知道如何将文件从 Assembla 获取到我的登台或制作网站。

这是通过提交完成的吗?我似乎找不到有关此过程的任何信息?我必须使用 ftp 来传输文件吗?

I have just started playing with version control. I have installed svn and svnX om my Mac and setup a free project with an Subversion repo on assembla.com.

I have not uploaded any files to my SVN repo as of yet. I have spent most of the day reading about the topic and figuring out what to do.

I have started to get a handle on the different concepts, but I am wondering how do I get my files from Assembla to my staging or production website.

Is this done through a commit? I can't seem to find anything about this process? Am I going to have to use ftp for the file transfer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

云裳 2024-10-24 06:50:07

颠覆的提交就像“现在将其保存在服务器上”。当您想在服务器上发布您的内容时,可以通过两种简单的方式来完成:(

  1. 需要根/用户访问服务器)您只需执行导出svn导出URL /path/to/whatever 在服务器上(需要安装 subversion 客户端)。导出就像正常的结帐,但之后您没有 .svn 目录和文件。
  2. (需要像 ftp 这样的上传功能)您在电脑上进行导出并将所有内容上传到服务器上。

我从来没有使用过这样的东西,但是:一些 IDE/工具/应用程序可能有类似发布助手之类的东西,可以为你做这件事,所以这取决于你使用什么......

A commit for subversion is like a "save this now on the server". When you want to publish your stuff on a server, you can do it in two simple ways:

  1. (requires root/user access to the server) you just do a export svn export URL /path/to/whatever on the server (installed subversion client is required). An export is like a normal checkout but you don't have .svn directories and files after that.
  2. (requires uploading possibility like ftp) you do the export on your pc and upload everything on the server.

I never used something like this but: some IDE/tools/apps might have something like a publish assistant which might do that for you, so it depends on what you use...

凉薄对峙 2024-10-24 06:50:07

在我具体评论您的问题之前,我建议您查看 DVCS(分布式版本控制系统)之一,例如 Git Mercurial集市.它们各有优缺点,如 问题

SVN 是 CVS 的一大进步,绝对是当时使用的工具。但事实是,DVCS 相对 SVN 的进步甚至比 SVn 相对 CVS 的进步还要大。

为了解决你的具体问题,我将分块进行。

首先,提交是指将文件或该文件的修订版本放入存储库中。我从未使用过 Assembla.com,但我假设它充当您的 SVN 存储库。

在此模型中,您将在本地系统上处理文件,一旦准备就绪,您就可以将它们提交到 Assembla.com 上的存储库。

在您的登台或生产系统上,您可以检查您的 SVN 存储库,然后按照部署应用程序所需的任何步骤进行操作。

如果需要,您可以在临时或生产系统上编辑文件,然后将修订提交到 SVN 存储库。然后,您可以从 SVN 存储库检出到本地系统,以确保同步。

如果您使用 Git、Mercurial 或 Bazaar,则基本上会遵循相同的模型(但有一些变化)。

Before I comment on your question specifically, I would recommend that you look at one of the DVCS (Distributed Version Control Systems) like Git, Mercurial, and Bazaar. They each have their pros and cons, as addressed in the question.

SVN was a huge step-forward from CVS and definitely was a the tool to use in its day. But the reality is that DVCSes are an even bigger step forward over SVN than SVn was over CVS.

To address your specific question, I am going to do it in pieces.

First, a commit is when you put a file or a revision of that file into you repo. I haven't ever used Assembla.com, but I am assuming that it is functioning as your SVN repo.

In this model, you would be working on file on your local system and once you have then ready, you would commit them to your repo on Assembla.com.

On your staging or production system, you would checkout your SVN repo and then follow any steps required to deploy your application.

You could, if required, edit files on the staging or production system and then commit the revision to your SVN repo. You would then checkout from your SVN repo to your local system to ensure that you were in sync.

Essentially the same model would be followed - with variations - if you used Git, Mercurial, or Bazaar.

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