[Git] Subversion の使い方
( git じゃないけど。)
試したいことがあって使おうと思ったんですが、Subversion を見事に忘れていました。
Contents
Subversion の基礎
リポジトリ作成
適当なファイルを作成して、リポジトリを作成します。
- svnadmin create
- svn import
% zf create project svn2git
% cd svn2git
% mkdir -p ~/svn/svn2git
% svnadmin create ~/svn/svn2git
% svn import file:///Users/***/svn/svn2git -m "initial import"
Adding tests
Adding tests/application
Adding tests/application/controllers
Adding tests/application/controllers/IndexControllerTest.php
Adding tests/bootstrap.php
Adding tests/library
Adding tests/phpunit.xml
Adding .zfproject.xml
Adding application
Adding application/Bootstrap.php
Adding application/models
Adding application/controllers
Adding application/controllers/IndexController.php
Adding application/controllers/ErrorController.php
Adding application/configs
Adding application/configs/application.ini
Adding application/views
Adding application/views/helpers
Adding application/views/scripts
Adding application/views/scripts/index
Adding application/views/scripts/index/index.phtml
Adding application/views/scripts/error
Adding application/views/scripts/error/error.phtml
Adding library
Adding docs
Adding docs/README.txt
Adding public
Adding public/.htaccess
Adding public/index.php
Committed revision 1.
チェックアウト
チェックアウトの練習。
- svn checkout
% cd ../
% rm -rf svn2git
% svn checkout file:///Users/***/svn/svn2git svn2git
A svn2git/tests
A svn2git/tests/application
A svn2git/tests/application/controllers
A svn2git/tests/application/controllers/IndexControllerTest.php
A svn2git/tests/bootstrap.php
A svn2git/tests/library
A svn2git/tests/phpunit.xml
A svn2git/.zfproject.xml
A svn2git/application
A svn2git/application/Bootstrap.php
A svn2git/application/models
A svn2git/application/controllers
A svn2git/application/controllers/IndexController.php
A svn2git/application/controllers/ErrorController.php
A svn2git/application/configs
A svn2git/application/configs/application.ini
A svn2git/application/views
A svn2git/application/views/helpers
A svn2git/application/views/scripts
A svn2git/application/views/scripts/index
A svn2git/application/views/scripts/index/index.phtml
A svn2git/application/views/scripts/error
A svn2git/application/views/scripts/error/error.phtml
A svn2git/library
A svn2git/docs
A svn2git/docs/README.txt
A svn2git/public
A svn2git/public/.htaccess
A svn2git/public/index.php
Checked out revision 1.
追加、コミット
追加とコミット。
- svn add
- svn commit
% vim add.txt
% svn status
? docs/add.txt
% svn update
At revision 1.
% svn add docs/add.txt
A (bin) docs/add.txt
% svn diff
Index: docs/add.txt
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: docs/add.txt
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
% svn commit -m "add add.txt"
Adding (bin) docs/add.txt
Transmitting file data .
Committed revision 2.
% svn status
Subversion client
以前、mac 向けのクライアントソフトを探しました。
Versions が良さそうだったのですが高かったので、ライセンスを持っていた coda を使ってました。
そういえば。