如何从命令行启动 SVN 项目? [英] How to start an SVN project from the command line?

查看:38
本文介绍了如何从命令行启动 SVN 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在本地计算机上创建了一个 ruby​​ on rails 应用程序.我有一个我创建的远程存储库.现在我如何第一次办理登机手续?我之前从未创建过自己的 svn 项目,所以我不知道该怎么做.我只提交过我参与过的项目.

So I have a ruby on rails application that I have created on my local computer. I have a remote repository that I've created. Now how do I check it in for the first time? I have never created my own svn project before, so I don't know how to do it. I've only made commits to projects that I've worked on.

cd [my project dir]
svn import -m "First Check-in" svn://[SubversionRunningMachine]/[ProjectName]/trunk

这将签入项目.现在您必须检查项目.

This will check in the project. Now you have to check out the project.

svn co svn://[SubversionRunningMachine]/[ProjectName]/trunk NewProjectName

推荐答案

实际上有两种方法可以做到这一点.一种是通过使用导入,它不会将您的活动代码库置于版本控制之下.另一种方法是在存储库中创建一个空项目,然后直接将其检出到代码库中.然后只需添加和提交:

There are actually two ways to do this. One is through the use of import which doesn't put your active code base under version control. The other method is to just create an empty project in the repository and then check it out directly into the code base. Then just do an add and an a commit:

svn mkdir <repo>/newProject
svn checkout <repo>/newProject /path/to/codebase
svn add /path/to/codebase/*
svn commit /path/to/codebase -m "adding initial codebase"

这里有一个关于如何创建新项目的很好的教程:http://web.archive.org/web/20110316170621/http://www.duchnik.com/tutorials/vc/svn-command-reference

There is a good tutorial on how to create a new project here: http://web.archive.org/web/20110316170621/http://www.duchnik.com/tutorials/vc/svn-command-reference

这篇关于如何从命令行启动 SVN 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆