Skip to content

Commit

Permalink
Fix #13
Browse files Browse the repository at this point in the history
  • Loading branch information
harupong committed Nov 14, 2014
1 parent 08a03fd commit d07087e
Show file tree
Hide file tree
Showing 20 changed files with 96 additions and 1,639 deletions.
24 changes: 1 addition & 23 deletions book/01-introduction/1-introduction.asc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//////////////////////////
[[_getting_started]]
//////////////////////////
== Getting Started
//////////////////////////
[[_getting_started]]
== 使い始める
//////////////////////////
Expand All @@ -14,39 +13,18 @@ At the end of this chapter you should understand why Git is around, why you shou
まずはバージョン管理システムの背景に触れ、次にGitをあなたのシステムで動かす方法、最後にGitで作業を始めるための設定方法について説明します。
この章を読み終えるころには、なぜGitがあるのか、なぜGitを使うべきなのかを理解し、また使い始めるための準備が全て整っていることと思います。
//////////////////////////
include::sections/about-version-control.asc[]
//////////////////////////
include::sections/about-version-control.asc[]
//////////////////////////
include::sections/history.asc[]
//////////////////////////
include::sections/history.asc[]
//////////////////////////
include::sections/basics.asc[]
//////////////////////////
include::sections/basics.asc[]
//////////////////////////
include::sections/command-line.asc[]
//////////////////////////
include::sections/command-line.asc[]
//////////////////////////
include::sections/installing.asc[]
//////////////////////////
include::sections/installing.asc[]
//////////////////////////
include::sections/first-time-setup.asc[]
//////////////////////////
include::sections/first-time-setup.asc[]
//////////////////////////
include::sections/help.asc[]
//////////////////////////
include::sections/help.asc[]
//////////////////////////
Expand Down
13 changes: 4 additions & 9 deletions book/01-introduction/sections/about-version-control.asc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
//////////////////////////
=== バージョン管理に関して
//////////////////////////
(((version control)))
//////////////////////////
What is "version control", and why should you care?
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.
For the examples in this book you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
//////////////////////////
(((version control)))
「バージョン管理」とは何でしょうか。また、なぜそれを気にする必要があるのでしょうか。
バージョン管理とは、一つのファイルやファイルの集合に対して時間とともに加えられていく変更を記録するシステムで、後で特定バージョンを呼び出すことができるようにするためのものです。
本書の例では、バージョン管理されるファイルとしてソフトウェアのソースコードを用いていますが、実際にはコンピューター上のあらゆる種類のファイルをバージョン管理のもとに置くことができます。
Expand All @@ -30,13 +29,12 @@ VCSを使うことで、ファイルを以前の状態まで戻したり、プ
//////////////////////////
==== ローカル・バージョン管理システム
//////////////////////////
(((version control,local)))
//////////////////////////
Many people's version-control method of choice is to copy files into another directory (perhaps a time-stamped directory, if they're clever).
This approach is very common because it is so simple, but it is also incredibly error prone.
It is easy to forget which directory you're in and accidentally write to the wrong file or copy over files you don't mean to.
//////////////////////////
(((version control,local)))
多くの人々が使っているバージョン管理手法は、他のディレクトリ(気の利いた人であれば、日時のついたディレクトリ)にファイルをコピーするというものです。
このアプローチはとても単純なので非常に一般的ですが、信じられないほど間違いが起こりやすいものです。
どのディレクトリにいるのか忘れやすく、うっかり間違ったファイルに書き込んだり、上書きするつもりのないファイルを上書きしてしまったりします。
Expand All @@ -50,7 +48,6 @@ To deal with this issue, programmers long ago developed local VCSs that had a si
.Local version control.
image::images/local.png[Local version control diagram]
//////////////////////////
.ローカル・バージョン管理図解
image::images/local.png[ローカル・バージョン管理図解]
Expand All @@ -68,14 +65,13 @@ RCS works by keeping patch sets (that is, the differences between files) in a sp
//////////////////////////
==== 集中バージョン管理システム
//////////////////////////
(((version control,centralized)))
//////////////////////////
The next major issue that people encounter is that they need to collaborate with developers on other systems.
To deal with this problem, Centralized Version Control Systems (CVCSs) were developed.
These systems, such as CVS, Subversion, and Perforce, have a single server that contains all the versioned files, and a number of clients that check out files from that central place. (((CVS)))(((Subversion)))(((Perforce)))
For many years, this has been the standard for version control.
//////////////////////////
(((version control,centralized)))
次に人々が遭遇した大きな問題は、他のシステムを使う開発者と共同作業をする必要があるということです。
この問題に対処するために、集中バージョン管理システム(CVCSs)が開発されました。このようなシステムにはCVS、Subversion、Perforceなどがありますが、それらはバージョン管理されたファイルを全て持つ一つのサーバーと、その中心点からファイルをチェックアウトする多数のクライアントからなっています。(((CVS)))(((Subversion)))(((Perforce)))
長年の間、これはバージョン管理の標準でした。
Expand Down Expand Up @@ -114,14 +110,13 @@ Local VCS systems suffer from this same problem – whenever you have the entire
//////////////////////////
==== 分散バージョン管理システム
//////////////////////////
(((version control,distributed)))
//////////////////////////
This is where Distributed Version Control Systems (DVCSs) step in.
In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don't just check out the latest snapshot of the files: they fully mirror the repository.
Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it.
Every checkout is really a full backup of all the data.
//////////////////////////
(((version control,distributed)))
ここで分散バージョン管理システム(DVCSs)の出番になります。
DVCS(Git、Mercurial、Bazaar、Darcsのようなもの)では、クライアントはファイルの最新スナップショットをチェックアウト(訳者注:バージョン管理システムから、作業ディレクトリにファイルやディレクトリをコピーすること)するだけではありません。リポジトリ(訳者注:バージョン管理の対象になるファイル、ディレクトリ、更新履歴などの一群)全体をミラーリングするのです。
そのため、あるサーバーが故障して、DVCSがそのサーバーを介して連携していたとしても、どれでもいいのでクライアント・リポジトリの一つをサーバーにコピーすれば修復できます。
Expand Down
6 changes: 0 additions & 6 deletions book/01-introduction/sections/basics.asc
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ Gitがチェックサム生成に用いる機構は、SHA-1ハッシュと呼ば
これは、16進数の文字(0-9とa-f)で構成された40文字の文字列で、ファイルの内容もしくはGit内のディレクトリ構造を元に計算されます。
SHA-1ハッシュは、このようなもののように見えます:
//////////////////////////
[source]
----
24b9da6552252987aa493b52f8696cd6d3b00373
----
//////////////////////////
[source]
----
24b9da6552252987aa493b52f8696cd6d3b00373
Expand Down
40 changes: 2 additions & 38 deletions book/01-introduction/sections/first-time-setup.asc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//////////////////////////
[[_first_time]]
//////////////////////////
=== First-Time Git Setup
//////////////////////////
[[_first_time]]
=== 最初のGitの構成
//////////////////////////
Expand Down Expand Up @@ -58,13 +57,6 @@ This is important because every Git commit uses this information, and it's immut
Gitをインストールしたときに最初にすべきことは、ユーザー名とE-mailアドレスを設定することです。
全てのGitのコミットはこの情報を用いるため、これは重要で、作成するコミットに永続的に焼き付けられます:
//////////////////////////
[source,console]
----
$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]
----
//////////////////////////
[source,console]
----
$ git config --global user.name "John Doe"
Expand Down Expand Up @@ -97,26 +89,18 @@ If you want to use a different text editor, such as Emacs, you can do the follow
これが設定されていない場合、Gitはシステムのデフォルトエディターを使います。大抵の場合はVimです。
Emacsのような違うテキストエディターを使いたい場合は、次のようにします:
//////////////////////////
[source,console]
----
$ git config --global core.editor emacs
----
//////////////////////////
[source,console]
----
$ git config --global core.editor emacs
----
//////////////////////////
[WARNING]
//////////////////////////
====
Vim and Emacs are popular text editors often used by developers on Unix based systems like Linux and Mac. If you are not familiar with either of these editors or are on a Windows system, you may need to search for instructions for how to set up your favorite editor with Git.
If you don't set an editor like this and you don't know what Vim or Emacs are, you will likely get into a really confusing state when they are launched.
====
//////////////////////////
[WARNING]
====
VimとEmacsは人気があり、LinuxやMacのようなUnixベースのシステムを使う開発者たちに特によく使われています。それらについてあまり知らない、もしくはWindowsを使っている場合は、好みのエディターをGitで使うにはどうすればいいか、調べる必要があるかもしれません。
Git用のエディターを設定していなくて、VimやEmacsのことを知らないとすると、Gitを使っている最中にそれが立ち上がって困惑することになってしまうでしょう。
Expand All @@ -132,19 +116,6 @@ If you want to check your settings, you can use the `git config --list` command
//////////////////////////
設定を確認したい場合は、その時点でGitが見つけられる全ての設定を一覧するコマンドである`git config --list`を使う事ができます:
//////////////////////////
[source,console]
----
$ git config --list
user.name=John Doe
[email protected]
color.status=auto
color.branch=auto
color.interactive=auto
color.diff=auto
...
----
//////////////////////////
[source,console]
----
$ git config --list
Expand All @@ -168,13 +139,6 @@ You can also check what Git thinks a specific key's value is by typing `git conf
//////////////////////////
また、Gitに設定されている特定のキーの値を、`git config <key>`とタイプすることで確認することができます:(((git commands, config)))
//////////////////////////
[source,console]
----
$ git config user.name
John Doe
----
//////////////////////////
[source,console]
----
$ git config user.name
Expand Down
17 changes: 1 addition & 16 deletions book/01-introduction/sections/help.asc
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
//////////////////////////
[[_git_help]]
//////////////////////////
=== Getting Help
//////////////////////////
[[_git_help]]
=== ヘルプを見る
//////////////////////////
If you ever need help while using Git, there are three ways to get the manual page (manpage) help for any of the Git commands:
//////////////////////////
もし、Gitを使っている間は助けがいつも必要なら、あらゆるGitコマンドのヘルプのマニュアル・ページ(manpage)を参照する3種類の方法があります。
//////////////////////////
[source,console]
----
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
----
//////////////////////////
[source,console]
----
$ git help <verb>
Expand All @@ -30,12 +21,6 @@ For example, you can get the manpage help for the config command by running(((gi
//////////////////////////
例えば、configコマンドのヘルプのmanpageを次のコマンドを走らせることで見ることができます。(((git commands, help)))
//////////////////////////
[source,console]
----
$ git help config
----
//////////////////////////
[source,console]
----
$ git help config
Expand Down
36 changes: 3 additions & 33 deletions book/01-introduction/sections/installing.asc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ Gitを使い始める前に、まずはコンピューターでそれを使え
仮にインストールされていたとしても、最新バージョンにアップデートしておくとよいでしょう。
パッケージやインストーラーを使ってインストールすることもできますし、ソースコードをダウンロードしてコンパイルすることもできます。
//////////////////////////
[NOTE]
//////////////////////////
====
This book was written using Git version *2.0.0*. Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently if you're using an older version. Since Git is quite excellent at preserving backwards compatibility, any version after 2.0 should work just fine.
====
//////////////////////////
[NOTE]
====
本書は、Git *2.0.0* の情報をもとに書かれています。登場するコマンドの大半は旧来のバージョンのGitでも使えるはずですが、バージョンによっては動作しなかったり、挙動が異なるものがあるかもしれません。ただし、Gitでは後方互換性がとてもよく維持されていますので、2.0以降のバージョンであれば問題はないはずです。
====
Expand All @@ -28,28 +27,21 @@ This book was written using Git version *2.0.0*. Though most of the commands we
//////////////////////////
==== Linuxにインストール
//////////////////////////
(((Linux, installing)))
//////////////////////////
If you want to install Git on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution.
If you're on Fedora for example, you can use yum:
//////////////////////////
(((Linux, installing)))
バイナリのインストーラーを通じてLinux上にGitをインストールしたいのであれば、大抵はディストリビューションに付属する基本的なパッケージ・マネジメント・ツールを使って、それを行なう事ができます。
もしFedoraを使っているのであれば、yumを使う事が出来ます:
//////////////////////////
$ yum install git
//////////////////////////
$ yum install git
//////////////////////////
If you're on a Debian-based distribution like Ubuntu, try apt-get:
//////////////////////////
もしUbuntuのようなDebianベースのディストリュビューションを使っているのであれば、apt-getを試してみましょう:
//////////////////////////
$ apt-get install git
//////////////////////////
$ apt-get install git
//////////////////////////
Expand All @@ -62,14 +54,13 @@ For more options, there are instructions for installing on several different Uni
//////////////////////////
==== Macにインストール
//////////////////////////
(((Mac, installing)))
//////////////////////////
There are several ways to install Git on a Mac.
The easiest is probably to install the Xcode Command Line Tools.(((Xcode)))
On Mavericks (10.9) or above you can do this simply by trying to run 'git' from the Terminal the very first time.
If you don't have it installed already, it will prompt you to install it.
//////////////////////////
(((Mac, installing)))
いくつかの方法でGitをMacにインストールできます。
そのうち最も簡単なのは、Xcode Command Line Toolsをインストールすることでしょう。(((Xcode)))
それは、Mavericks (10.9)以降のバージョンであれば、'git'をターミナルから実行しようとするだけで実現できます。
Expand Down Expand Up @@ -146,19 +137,9 @@ For example, if you're on a system that has yum (such as Fedora) or apt-get (suc
Gitをソースからインストールするのなら、Gitが依存する以下のライブラリが必要です:curl, zlib, openssl, expat, and libiconv
もし、使っているシステムでyumが使えたり(Fedoraなど)、apt-getが使えたり(Debianベースのシステムなど)する場合は、それぞれ次のようなコマンドを使って依存関係をインストールできます:
//////////////////////////
$ yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel

//////////////////////////
$ yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel
//////////////////////////
$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev

//////////////////////////
$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
Expand All @@ -176,14 +157,6 @@ Then, compile and install:
//////////////////////////
ダウンロードが終わったら、コンパイルしてインストールします:
//////////////////////////
$ tar -zxf git-1.9.1.tar.gz
$ cd git-1.9.1
$ make configure
$ ./configure --prefix=/usr
$ make all doc info
$ sudo make install install-doc install-html install-info
//////////////////////////
$ tar -zxf git-1.9.1.tar.gz
$ cd git-1.9.1
$ make configure
Expand All @@ -196,7 +169,4 @@ After this is done, you can also get Git via Git itself for updates:
//////////////////////////
一度この手順を済ませると、次からはGitを使ってGitそのものをアップデートできます:
//////////////////////////
$ git clone git://git.kernel.org/pub/scm/git/git.git
//////////////////////////
$ git clone git://git.kernel.org/pub/scm/git/git.git
Loading

0 comments on commit d07087e

Please sign in to comment.