1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SVNでフォルダ構成を変更する方法

Posted at

概要

SVNで管理されているプロジェクトにおいて、ファイルの整理やフォルダ構成の変更を行う際の手順について解説します。新しいフォルダを作成し、既存のファイルを適切に移動する方法を紹介します。

基本的な手順

1. 新しいフォルダの作成

svn mkdir new_folder_name

svn mkdirコマンドを使用して新しいフォルダを作成します。これにより、SVNの管理下に適切にフォルダが追加されます。

2. ファイルの移動

svn move old_path/file.txt new_folder_name/file.txt

ファイルを移動する際は必ずsvn moveコマンドを使用します。通常のmvコマンドを使用すると、SVNがファイルの移動を認識できず、履歴が失われてしまいます。

3. 変更の確認とコミット

svn status
svn commit -m "フォルダ構成を変更"

svn statusでファイルの移動状態を確認し、問題なければコミットを実行します。

まとめ

SVNでフォルダ構成を変更する際は、svn moveを使うと履歴をそのまま引き継げます。
これにより過去の修正内容も確認できるので、安心してリファクタリングが行えます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?