Last active
August 29, 2015 14:00
-
-
Save mountcedar/11174478 to your computer and use it in GitHub Desktop.
今更聞けないSubversionの使い方 ref: http://qiita.com/mountcedar/items/e756bb9136e3b1722bb2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache Subversion(アパッチ・サブバージョン SVN)はプログラムのソースコードなどを管理する集中型バージョン管理システムの一つである。元々は、CollabNet, Inc. が開発していたが、2009年11月7日にApache Incubatorプロジェクトのひとつとなり、2010年2月17日よりApacheのトッププロジェクトとなった。ライセンスはApache Licenseに準じたものとなっている。 | |
歴史的には広く使われているバージョン管理システムの一つにCVSがあった。CVSはよくできているが、ディレクトリの移動の管理やネットワーク対応の点、不可分な更新などでやや難があった。これらCVSの問題点を解決すべく開発されたのがSubversionである。 古くからオープンソースソフトウェアの開発においてはCVSが多く使われていたが、近年ではSubversionを使用するオープンソースプロジェクトも多くなりつつある。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum install subversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn mkdir svn://192.168.1.2/repo/thread -m "create new project, thread" | |
$ cd /path/to/thread | |
$ svn import . svn://192.168.1.2/repo/thread/trunk -m "initial import of project, thread" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn mkdir svn://192.168.1.2/repo/thread/tags -m "create tags directory in thread project" | |
$ svn mkdir svn://192.168.1.2/repo/thread/branches -m "create branches directory in thread project" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /path/to/thread | |
$ cd .. | |
$ mv thread thread_ | |
$ svn co svn://192.168.1.2/repo/thread/trunk thread | |
$ ls | |
thread thread_ … |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn add newfile | |
$ svn commit newfile -m "add newfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn commit -m "add newfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn commit changed_file -m "update changed_file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn commit -m "update all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
編集中 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
編集中 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install subversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn copy <スナップショットをとるソースコードのアドレス> <スナップショットをとる先のアドレス(新規)> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn copy svn://192.168.1.2/repo/thread/trunk svn://192.168.1.2/repo/thread/tags/yyyyMMdd -m "create new tag, yyyyMMdd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn copy svn://192.168.1.2/repo/thread/trunk svn://192.168.1.2/repo/thread/branches/yyyyMMdd -m "create new branch, yyyyMMdd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn export svn://192.168.1.2/repo/thread/tags/yyyyMMdd thread-yyyyMMdd | |
$ svn co svn://192.168.1.2/repo/thread/branches/yyyyMMdd thread-yyyyMMdd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn export svn://192.168.1.2/repo/thread/trunk thread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /path/to/workingcopy | |
$ svn export . ../thread-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
編集中 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install subversion | |
or | |
$ sudo port install subversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn ls svn://192.168.1.2/repo | |
thread/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn help | |
<どんなコマンドがあるかの一覧が見れる> | |
$ svn help XXX | |
<XXXというコマンドの詳細(引数も含む)が見れる> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn list svn://192.168.1.2/repo | |
thread/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$svn ls svn://192.168.1.2/repo/thread | |
branches/ tags/ trunk/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn co svn://192.168.1.2/repo/thread/trunk thread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn checkout svn://192.168.1.2/repo/thread/trunk thread |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment