将现有文件夹放入存储库 [英] Make an existing folder into a repository

查看:32
本文介绍了将现有文件夹放入存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定直接在记事本中修改文件可能很危险,现在是时候进行一些适当的源代码控制了(我对源代码控制很陌生).我已经在我的服务器上安装了 VisualSVN 服务器,在我的客户端机器上安装了 TortoiseSVN.我可以很好地创建新文件夹,检查它们等等.但是,在我的服务器上,我有一个现有的 IIS 文件夹结构,并且到处都有基于此位置的链接.如何在不移动文件的情况下使整个文件夹与 SVN 一起使用?

I've decided that modifying files directly in notepad is probably dangerous and it was about time to have some proper source control (I am quite new to source control). I have installed VisualSVN server on my server and TortoiseSVN on my client machine. I can create new folders fine, check them our etc. However, on my server, I have an existing folder structure in place for IIS and there are links based on this location everywhere. How can I make the entire folder work with SVN without moving the files?

推荐答案

有一个检查现有目录结构的简单解决方案:

There is a simple solution for checking in an existing directory structure:

  1. 打开 TortoiseSVN 的存储库浏览器,并为要签入的项目创建一个新目录.
  2. 从某个地方的 SVN 检出这个新创建的空目录
  3. 打开检出目录并将包含的隐藏 .svn 目录移动到项目的根目录中.这将为所有文件和子文件夹启用来自 TortoiseSVN 的上下文菜单.
  4. 添加要签入的每个文件和文件夹(上下文菜单命令添加...)
  5. 在项目根文件夹上执行 SVN Commit...
  1. Open the repository browser of TortoiseSVN and create a new directory for the project you want to check-in.
  2. Check-out this newly created empty directory from SVN somewhere
  3. Open the checked-out directory and move the contained hidden .svn directory into the root directory of your project. This enables the context menues from TortoiseSVN for all files and sub-folders.
  4. Add every file and folder you want to check-in (context menu command Add...)
  5. Execute SVN Commit... on the project root folder

这篇关于将现有文件夹放入存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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