Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing.asc #116

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 103 additions & 44 deletions book/01-introduction/sections/installing.asc
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Gitを使い始める前に、まずはコンピューターでそれを使え
[NOTE]
//////////////////////////
====
This book was written using Git version *2.0.0*.
This book was written using Git version *2.8.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.
Since Git is quite excellent at preserving backwards compatibility, any version after 2.8 should work just fine.
====
//////////////////////////
====
本書は、Git *2.0.0* の情報をもとに書かれています。登場するコマンドの大半は旧来のバージョンのGitでも使えるはずですが、バージョンによっては動作しなかったり、挙動が異なるものがあるかもしれません。ただし、Gitでは後方互換性がとてもよく維持されていますので、2.0以降のバージョンであれば問題はないはずです
本書は、Git *2.8.0* の情報をもとに書かれています。登場するコマンドの大半は旧来のバージョンのGitでも使えるはずですが、バージョンによっては動作しなかったり、挙動が異なるものがあるかもしれません。ただし、Gitでは後方互換性がとてもよく維持されていますので、2.8以降のバージョンであれば問題はないはずです
====

//////////////////////////
Expand All @@ -31,15 +31,15 @@ Since Git is quite excellent at preserving backwards compatibility, any version

(((Linux, installing)))
//////////////////////////
If you want to install the basic Git tools 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:
If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the package management tool that comes with your distribution.
If you're on Fedora (or any closely-related RPM-based distribution, such as RHEL or CentOS), you can use `dnf`:
//////////////////////////
バイナリのインストーラーを使ってLinux上にGitと主な関連ツールをインストールしたいのであれば、大抵はディストリビューションに付属する基本的なパッケージ・マネジメント・ツールを使って、それを行なう事ができます。
もしFedoraを使っているのであれば、yumを使う事が出来ます:
バイナリのインストーラーを使ってLinux上にGitと主な関連ツールをインストールしたいのであれば、大抵はディストリビューションに付属するパッケージ・マネジメント・ツールを使って、それを行なう事ができます。
もしFedora(若しくは、RHELやCentOSなどの、それに密接に関係した、RPMベースのディストリビューション)を使っているのであれば、yumを使う事が出来ます:

[source,console]
----
$ sudo yum install git-all
$ sudo dnf install git-all
----

//////////////////////////
Expand All @@ -53,7 +53,7 @@ $ sudo apt-get install git-all
----

//////////////////////////
For more options, there are instructions for installing on several different Unix flavors on the Git website, at http://git-scm.com/download/linux[].
For more options, there are instructions for installing on several different Unix distributions on the Git website, at https://git-scm.com/download/linux[].
//////////////////////////
そのほかにも、いくつかのLinuxディストリビューション用のインストール手順がGitのウェブサイト http://git-scm.com/download/linux[] に掲載されています。

Expand All @@ -67,35 +67,44 @@ For more options, there are instructions for installing on several different Uni
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.
//////////////////////////
いくつかの方法でGitをMacにインストールできます。
そのうち最も簡単なのは、Xcode Command Line Toolsをインストールすることでしょう。(((Xcode)))
それは、Mavericks (10.9)以降のバージョンであれば、'git'をターミナルから実行しようとするだけで実現できます。
Mavericks (10.9)以降のバージョンであれば、'git'をターミナルから実行するだけでGitをインストールできます。

[source,console]
----
$ git --version
----

//////////////////////////
If you don't have it installed already, it will prompt you to install it.
//////////////////////////
もしXcode Command Line Toolsがインストールされていなければ、インストールするよう促してくれます。

//////////////////////////
If you want a more up to date version, you can also install it via a binary installer.
An OSX Git installer is maintained and available for download at the Git website, at http://git-scm.com/download/mac[].
A macOS Git installer is maintained and available for download at the Git website, at https://git-scm.com/download/mac[].

//////////////////////////
最新バージョンのGitを使いたいのであれば、インストーラーを使うといいでしょう。
OSX用のGitインストーラーはよくメンテナンスされており、Gitのウェブサイト http://git-scm.com/download/mac[] からダウンロードできます。
macOS用のGitインストーラーはよくメンテナンスされており、Gitのウェブサイト https://git-scm.com/download/mac[] からダウンロードできます。

//////////////////////////
.Git OS X Installer.
image::images/git-osx-installer.png[Git OS X installer.]
.Git macOS Installer.
image::images/git-osx-installer.png[Git macOS installer.]
//////////////////////////
.Git OS Xインストーラー
image::images/git-osx-installer.png[Git OS Xインストーラー]
.Git macOS インストーラー
image::images/git-osx-installer.png[Git macOS インストーラー]

//////////////////////////
You can also install it as part of the GitHub for Mac install.
You can also install it as part of the GitHub for macOS install.
Their GUI Git tool has an option to install command line tools as well.
You can download that tool from the GitHub for Mac website, at http://mac.github.com[].
You can download that tool from the GitHub for macOS website, at https://desktop.github.com[].
//////////////////////////
あるいは、GitHub for Macの一部としてGitをインストールすることもできます
あるいは、GitHub for macOSの一部としてGitをインストールすることもできます
GitHubが提供しているGUIのGitツールには、コマンドラインツールをインストールするオプションもあるのです。
このツールは、GitHub for Macのウェブサイト http://mac.github.com[] からダウンロードできます。
このツールは、GitHub for macOSのウェブサイト http://desktop.github.com[] からダウンロードできます。

//////////////////////////
==== Installing on Windows
Expand All @@ -105,26 +114,32 @@ GitHubが提供しているGUIのGitツールには、コマンドラインツ
//////////////////////////
There are also a few ways to install Git on Windows.(((Windows, installing)))
The most official build is available for download on the Git website.
Just go to http://git-scm.com/download/win[] and the download will start automatically.
Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to https://git-for-windows.github.io/[].
Just go to https://git-scm.com/download/win[] and the download will start automatically.
Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to https://gitforwindows.org[].
//////////////////////////
Windowsの場合でも、いくつかの方法でGitをインストールできます。(((Windows, installing)))
最も公式なビルドは、Gitのウェブサイトからダウンロードできます。
http://git-scm.com/download/win[] にアクセスすると、ダウンロードが自動で始まるようになっています。
注意事項として、このプロジェクトはGit for Windowsという名前で、Gitそのものとは別のプロジェクトです。詳細については https://git-for-windows.github.io/[] を参照してください。
https://git-scm.com/download/win[] にアクセスすると、ダウンロードが自動で始まるようになっています。
注意事項として、このプロジェクトはGit for Windowsという名前で、Gitそのものとは別のプロジェクトです。詳細については https://gitforwindows.org[] を参照してください。

//////////////////////////
Another easy way to get Git installed is by installing GitHub for Windows.
To get an automated installation you can use the https://chocolatey.org/packages/git[Git Chocolatey package].
Note that the Chocolatey package is community maintained.
//////////////////////////
自動でインストールしたかったら、https://chocolatey.org/packages/git[GitのChocolateyパッケージ]を使ってインストールができます。注意事項として、このChocolateyパッケージはコミュニティが管理しています。

//////////////////////////
Another easy way to get Git installed is by installing GitHub Desktop.
The installer includes a command line version of Git as well as the GUI.
It also works well with Powershell, and sets up solid credential caching and sane CRLF settings.(((Powershell)))(((CRLF)))(((credential caching)))
It also works well with PowerShell, and sets up solid credential caching and sane CRLF settings.(((PowerShell)))(((CRLF)))(((credential caching)))
We'll learn more about those things a little later, but suffice it to say they're things you want.
You can download this from the GitHub for Windows website, at http://windows.github.com[].
You can download this from the https://desktop.github.com[GitHub Desktop website].
//////////////////////////
もう一つ、Gitをインストールする簡単な方法として、GitHub for Windowsがあります
GitHub for Windowsのインストーラーには、GUIとコマンドラインバージョンのGitが含まれています。
PowerShellとの連携がしっかりしていて、認証情報のキャッシュは確実、CRLF改行コードの設定はまともです。(((Powershell)))(((CRLF)))(((credential caching)))
これらについては後ほど説明しますので、ここでは「Gitを使うとほしくなるもの」とだけ言っておきます。
GitHub for Windowsは、 http://windows.github.com[] からダウンロードできます。
もう一つ、Gitをインストールする簡単な方法として、GitHub Desktopがあります
GitHub Desktopのインストーラーには、GUIとコマンドラインバージョンのGitが含まれています。
PowerShellとの連携がしっかりしていて、認証情報のキャッシュや、CRLF(改行コード)についての問題が起きないようになっています。(((Powershell)))(((CRLF)))(((credential caching)))
これらについては後ほど説明しますので、ここでは「Gitを使うと必要になるもの」とだけ言っておきます。
GitHub Desktopは、 http://desktop.github.com[GitHub Desktop website] からダウンロードできます。

//////////////////////////
==== Installing from Source
Expand All @@ -139,31 +154,75 @@ The binary installers tend to be a bit behind, though as Git has matured in rece
インストーラーは最新からは少しですが遅れがちです。とはいえ、Gitの完成度が高まってきたおかげで、今ではその差はさほどでもありません。

//////////////////////////
If you do want to install Git from source, you need to have the following libraries that Git depends on: curl, zlib, openssl, expat, and libiconv.
For example, if you're on a system that has yum (such as Fedora) or apt-get (such as a Debian based system), you can use one of these commands to install the minimal dependencies for compiling and installing the Git binaries:
If you do want to install Git from source, you need to have the following libraries that Git depends on: autotools, curl, zlib, openssl, expat, and libiconv.
For example, if you're on a system that has `dnf` (such as Fedora) or `apt-get` (such as a Debian-based system), you can use one of these commands to install the minimal dependencies for compiling and installing the Git binaries:

//////////////////////////
Gitをソースからインストールするのなら、Gitが依存する以下のライブラリが必要です:curl、zlib、openssl、expat、libiconv
もし、使っているシステムでyumが使えたり(Fedoraなど)、apt-getが使えたり(Debianベースのシステムなど)する場合は、それぞれ次のようなコマンドを使うと Git のバイナリをコンパイルしインストールするための必要最低限の依存ライブラリをインストールしてくれます。
Gitをソースからインストールするのなら、Gitが依存する以下のライブラリが必要です:autotools、curl、zlib、openssl、expat、libiconv
もし、使っているシステムでdnfが使えたり(Fedoraなど)、apt-getが使えたり(Debianベースのシステムなど)する場合は、それぞれ次のようなコマンドを使うと Git のバイナリをコンパイルしインストールするための必要最低限の依存ライブラリをインストールしてくれます。

[source,console]
----
$ sudo yum install curl-devel expat-devel gettext-devel \
$ sudo dnf install dh-autoreconf curl-devel expat-devel gettext-devel \
openssl-devel perl-devel zlib-devel
$ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
$ sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev \
gettext libz-dev libssl-dev
----

//////////////////////////
In order to be able to add the documentation in various formats (doc, html, info), these additional dependencies are required (Note: users of RHEL and RHEL-derivatives like CentOS and Scientific Linux will have to https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[enable the EPEL repository] to download the `docbook2X` package):
//////////////////////////
なお、ドキュメントを doc、html、info 形式等で出力したい場合は、以下の依存ライブラリも必要になります(RHELやRHEL派生のディストリビューション(CentOS・Scientific Linuxなど)では、 https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[EPELリポジトリを有効] にしてください。`docbook2X`パッケージをダウンロードするのに必要になります)。
なお、ドキュメントを doc、html、info 形式等で出力したい場合は、以下の依存ライブラリも必要になります(RHELやRHEL派生のディストリビューション(CentOS・Scientific Linuxなど)では、https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[EPELリポジトリを有効] にしてください。`docbook2X`パッケージをダウンロードするのに必要になります)。

[source,console]
----
$ sudo yum install asciidoc xmlto docbook2X
$ sudo apt-get install asciidoc xmlto docbook2x
----

//////////////////////////
In order to be able to add the documentation in various formats (doc, html, info), these additional dependencies are required:
//////////////////////////
さまざまな形式のドキュメント(doc、html、info)で追加できるようにするには、次のパッケージにも追加で依存します。


[source,console]
----
$ sudo dnf install asciidoc xmlto docbook2X
$ sudo apt-get install asciidoc xmlto docbook2x
----


[NOTE]
//////////////////////////
====
Users of RHEL and RHEL-derivatives like CentOS and Scientific Linux will have to https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[enable the EPEL repository] to download the `docbook2X` package.
====
//////////////////////////
====
RHELやCentOSなどのRHEL派生ディストリビューション、Scientific Linuxのユーザーは https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F[enable the EPEL repository] から`docbook2X`パッケージをダウンロードする必要があるでしょう。
====

//////////////////////////
If you're using a Debian-based distribution (Debian/Ubuntu/Ubuntu-derivatives), you also need the `install-info` package:
//////////////////////////
もし、Debianベースのディストリビューション (Debian/Ubuntu/Ubuntu派生 など)を使っているのであれば, `install-info` パッケージも必要です:

[source,console]
----
$ sudo apt-get install install-info
----

//////////////////////////
If you're using a RPM-based distribution (Fedora/RHEL/RHEL-derivatives), you also need the `getopt` package (which is already installed on a Debian-based distro):
//////////////////////////
もし、RPMベースのディストリビューション (Fedora/RHEL/RHEL-derivatives)使っているなら、`getopt`パッケージも必要です(Debianベースのディストリビューションではすでにインストールされています)。

[source,console]
----
$ sudo dnf install getopt
----

//////////////////////////
Additionally, if you're using Fedora/RHEL/RHEL-derivatives, you need to do this
//////////////////////////
Expand All @@ -181,7 +240,7 @@ due to binary name differences.

//////////////////////////
When you have all the necessary dependencies, you can go ahead and grab the latest tagged release tarball from several places.
You can get it via the Kernel.org site, at https://www.kernel.org/pub/software/scm/git[], or the mirror on the GitHub web site, at https://github.com/git/git/releases[].
You can get it via the kernel.org site, at https://www.kernel.org/pub/software/scm/git[], or the mirror on the GitHub website, at https://github.com/git/git/releases[].
It's generally a little clearer what the latest version is on the GitHub page, but the kernel.org page also has release signatures if you want to verify your download.
//////////////////////////
依存関係のインストールが完了したら、次にタグ付けされた最新のリリース用tarballを入手しましょう。複数のサイトから入手できます。
Expand All @@ -195,8 +254,8 @@ Then, compile and install:

[source,console]
----
$ tar -zxf git-2.0.0.tar.gz
$ cd git-2.0.0
$ tar -zxf git-2.8.0.tar.gz
$ cd git-2.8.0
$ make configure
$ ./configure --prefix=/usr
$ make all doc info
Expand Down