LoginSignup
12
15

More than 1 year has passed since last update.

Git for Windows インストール (日本語訳あり)

Last updated at Posted at 2021-05-16

Gitのインストーラが新しくなるたびに、
ウィザードの質問が増えるのでちょっと記録しておく。

動画も作りました

対象

  • Windows 10 Pro
  • Git 2.31.1 64-bit

ダウンロード

image.png

ウィザードの流れ

基本的にはすべてデフォルトでもOK。でもいつも新しい画面が出て悩んでしまう。。。

Select Components

コンポーネント選択

  • Git Bash Here・・・これは必ず選択
  • Git GUI Here・・・GitデフォルトのGUI画面を表示するけど見づらいしほぼ使ったことない

image.png

Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue.
↓↓↓↓↓↓↓
インストールするコンポーネントを選択します。インストールしたくないコンポーネントをクリアします。続行する準備ができたら、[Next]をクリックします。

Select Start Menu Folder

Windowsのスタートメニューのフォルダを選択

スタートメニューをあえて変えたい場合に指定することもできるが余計わからなくなるだけなのでデフォルトがいいかな。

  • Don't create a Start Menu folder・・・Git自体をスタートメニューから起動したことないのでスタートメニューに入れなくてもいいかも。

image.png

Setup will create the program's shortcuts in the following Start menu folder.
↓↓↓↓↓↓↓
セットアップは、次のスタートメニューフォルダにプログラムのショートカットを作成します。

to continue, click Next. If you would like to select a different folder, click Browse.
↓↓↓↓↓↓↓
続行するには、[Next]をクリックします。別のフォルダを選択する場合は、[Browse...]をクリックします。

Choosing the default editor used by Git

デフォルトのエディタを選択

Vim使いならデフォルト。
いつもデフォルト選択してたけど、「Atom」選択してみようかな。
説明にも"最新のGUIエディターに切り替えることを強く勧める"とのことだし。

image.png

The Vim editor, while powerful, can be hard to use. Its user interface is unintuitive and its key bindings are awkward.

Note: Vim is the default editor of Git for Windows only for historical reasons, and it is highly recommended to switch to a modern GUI editor instead.

Note: This will leave the 'core.editor' option unset, which will make Git fall back to the 'EDITOR' environment variable. The default editor is Vim - but you may set it to some other editor of you choise.
↓↓↓↓↓↓↓
Vimエディターは強力ですが、使いにくい場合があります。そのユーザーインターフェイスは直感的ではなく、そのキーバインディングは扱いにくいです。

注:Vimは歴史的な理由からのみGit for Windowsのデフォルトのエディターであり、代わりに最新のGUIエディターに切り替えることを強くお勧めします。

注:これにより、「core.editor」オプションが未設定のままになり、Gitが「EDITOR」環境変数にフォールバックします。デフォルトのエディターはVimですが、他のエディターに設定することもできます。

選択肢はこんな感じ
image.png

Adjusting the name of the initial branch in new repositories

新しいリポジトリ作成時の初期ブランチの名称

GitHubもデフォルトが「main」になったので、ここは「main」を指定してもよさそう。

image.png

  • Let Git decide(Gitに決めさせる)

Let Git use its default branch name (currently: "master") for the initial branch in newly created repositories.
The Git project intends to change this default to a more inclusive name in the near future.
↓↓↓↓↓↓↓
新しく作成されたリポジトリの最初のブランチに、Gitにデフォルトのブランチ名(現在は「master」)を使用させます。
Gitプロジェクトは、近い将来、このデフォルトをより包括的な名前に変更する予定です。

  • Override the default branch name for new repositories(新しいリポジトリのデフォルトのブランチ名を上書きする)

New! Many teams already renamed their default branches; common choices are "main", "trunk" and "development". Specify the name "git init" should use for the initial branch:
↓↓↓↓↓↓↓
新着!多くのチームはすでにデフォルトのブランチの名前を変更しています。一般的な選択肢は、「main」、「trunk」、「development」です。 「gitinit」が最初のブランチに使用する名前を指定します。

下の注釈

This setting does not affect existing repositories.
↓↓↓↓↓↓↓
この設定は、既存のリポジトリには影響しません。

Ajusting you PATH environment

パス環境設定

WindowsのコマンドプロンプトやPowerShellからもGitコマンド実行できるので推奨のGit from the command line and also from 3rd-party softwareかな。

image.png

  • Use Git from Git Bash only(GitBashのGitのみを使用する)

This is the most cautious choise as your PATH will not be modified al all. You will only be able to use the Git command line tools from Git Bash.
↓↓↓↓↓↓↓
PATHがすべて変更されるわけではないため、これは最も慎重な選択です。 GitBashのGitコマンドラインツールのみを使用できます。

  • Git from the command line and also from 3rd-party software(コマンドラインおよびサードパーティソフトウェアからのGit)

(Recommended) This option adds only some minimal Git wrappers to you PATH to avoid cluttering your environment with optional Unix tools. You will be able to use Git from Git Bash, the Command Prompt and the Windows PowerShell as well as any third-party software looing for Git in PATH.
↓↓↓↓↓↓↓
(推奨)このオプションは、オプションのUnixツールで環境が乱雑にならないように、PATHに最小限のGitラッパーのみを追加します。 Git Bash、コマンドプロンプト、Windows PowerShellのGit、およびPATHでGitを探しているサードパーティソフトウェアを使用できます。

  • Use Git and optional Unix tools from the Command Prompt(コマンドプロンプトからGitとオプションのUnixツールを使用する)

Both Git and the optional Unix tools will be added to your PATH. Warning: This override Windows tools like "find" and "sort". Only use this option if you understand the implications.
↓↓↓↓↓↓↓
GitとオプションのUnixツールの両方がPATHに追加されます。警告:これは、「検索」や「並べ替え」などのWindowsツールを上書きします。このオプションは、影響を理解している場合にのみ使用してください。

Choosing HTTPS transport backend

HTTPS通信時使うツール

こだわりがなければUse the OpenSSL libraryでいいかな。

image.png

  • Use the OpenSSL library(OpenSSLライブラリを使用する)

Server certificates will be validated using the ca-bundle.crt file.
↓↓↓↓↓↓↓
サーバー証明書は、ca-bundle.crtファイルを使用して検証されます。

  • Use the native Windows Secure Channel library(ネイティブのWindowsセキュアチャネルライブラリを使用する)

Server certificates will be validated using Windows Certificate Stores. This option also allows you to use your company's internal Root CA certificates distributed e.g. via Active Directory Domain Services.
↓↓↓↓↓↓↓
サーバー証明書は、Windows証明書ストアを使用して検証されます。このオプションを使用すると、会社の内部ルートCA証明書を使用することもできます。 ActiveDirectoryドメインサービス経由。

Configuring the line ending conversions

行末「改行コード」変換の設定

あとでも設定変更できるけど、WindowsならCheckout Windows-style, commit Unix-style line endingsかな。
改行コードがごちゃ混ぜのときに統一してくれるのでいい感じ。実装時にしっかり統一してくれるエンジニアばかりではないので。

image.png

  • Checkout Windows-style, commit Unix-style line endings(Windowsスタイルをチェックアウトし、Unixスタイルの行末をコミットします)

Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows ("core.autocrlf" is set to "true").
↓↓↓↓↓↓↓
Gitは、テキストファイルをチェックアウトするときにLFをCRLFに変換します。テキストファイルをコミットすると、CRLFはLFに変換されます。クロスプラットフォームプロジェクトの場合、これはWindowsで推奨される設定です(「core.autocrlf」は「true」に設定されています)。

  • Checkout as-is, commit Unix-style line endings(そのままチェックアウトし、Unixスタイルの行末をコミットします)

Git will not perform any conversion when checking out text files, When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Unix ("core.autocrlf" is set to "input").
↓↓↓↓↓↓↓
Gitは、テキストファイルをチェックアウトするときに変換を実行しません。テキストファイルをコミットするときに、CRLFはLFに変換されます。クロスプラットフォームプロジェクトの場合、これはUnixで推奨される設定です(「core.autocrlf」は「input」に設定されます)。

  • Checkout as-is, commit as-is(現状のままチェックアウト、現状のままコミット)

Git will not perform any conversions when checking out or committing text files. Choosing this option is not recommended for cross-platform projects ("core.autocrlf" is set to "false").
↓↓↓↓↓↓↓
Gitは、テキストファイルをチェックアウトまたはコミットするときに変換を実行しません。このオプションを選択することは、クロスプラットフォームプロジェクトには推奨されません(「core.autocrlf」は「false」に設定されます)。

Configuring the terminal emulator to use with Git Bash

GitBashで使用するターミナルエミュレーターの構成

ターミナルの選択はUse MinTTYかな。Linuxコマンドとかも使えていい感じ。
以前、Use Windows' default console window選択したら予想以上に使いづらかった。。

image.png

  • Use MinTTY (the default terminal of MSYS2) (MinTTYを使う)

Git Bash will use MinTTY as ternimal emulator, which sports a resizable window, non-rectangular selections and a Unicode font. Windows console programs (such as interactive Python) must be launched via winpty to work in MinTTY.
↓↓↓↓↓↓↓
Git Bashは、サイズ変更可能なウィンドウ、非長方形の選択、およびUnicodeフォントを備えたターミナルエミュレーターとしてMinTTYを使用します。 MinTTYで動作するには、Windowsコンソールプログラム(インタラクティブPythonなど)を winpty経由で起動する必要があります。

  • Use Windows' default console window(Windowsのデフォルトのコンソールウィンドウを使用する)

Git will use the default console window of Windows ("cmd.exe"), which works well with Win32 console programs such as interactive Python or node.js, but has a very limited default scroll-back, needs to be configured to use a Unicode font in order to display non-ASCII characters correctly, and prior to Windows 10 its window was not freely resizable and it only allowed rectangular text selections.
↓↓↓↓↓↓↓
GitはWindowsのデフォルトのコンソールウィンドウ( "cmd.exe")を使用します。これはインタラクティブなPythonやnode.jsなどのWin32コンソールプログラムでうまく機能しますが、デフォルトのスクロールバックは非常に限られているため、非ASCII文字を正しく表示するためのUnicodeフォントであり、Windows 10より前は、ウィンドウのサイズを自由に変更することはできず、長方形のテキストしか選択できませんでした。

Choose the default behavior of `git pull`

git pullのときのデフォルトの動作を選択

ここはスタンダードのDefaultでいいかな。

image.png

  • Default (fast-forward or merge) (デフォルト fast-forward か merge)

This is the standard behavior of git pull: fast-forward the current branch to the fetched branch when possible, otherwise create a merge commit.
↓↓↓↓↓↓↓
これは git pullの標準的な動作です。可能な場合は現在のブランチをフェッチされたブランチに早送りします。それ以外の場合は、マージコミットを作成します。

  • Rebase (リベース)

Rebase the current branch onto the fetched branch. If there are no local commits to rebase, this is equivalent to a fast-forward.
↓↓↓↓↓↓↓
現在のブランチをフェッチされたブランチにリベースします。リベースするローカルコミットがない場合、これはfast-forwardと同等です。

  • Only ever fast-forward (fast-forwardのみ)

Fast-forward to the fetched branch. Fall if that is not possible.
↓↓↓↓↓↓↓
フェッチされたブランチにFast-forwardします。それが不可能な場合は落下します。

Choose a credential helper

資格情報ヘルパーの選択

新しく追加されてた確認事項、、、正直よくわからん。。
Git Credential Managerは.NET framework使うみたいだし非推奨だし選択しないかな。
Noneもしゃくだし。。

image.png

  • Git credential Manager Core

(NEW!) Use the new, cross-platform version of the Git Credential Manager. See more infomation about thhe future of Git Credential Manager here.
↓↓↓↓↓↓↓
(NEW!)Git CredentialManagerの新しいクロスプラットフォームバージョンを使用します。 Git Credential Managerの将来について詳しくは、こちらをご覧ください。

  • Git Credential Manager

(DEPRECATED) The Git Credential Manager for Windows handles credentials e.g. for Azure DevOps and GitHub (requires .NET framework v4.5.1 or later).
↓↓↓↓↓↓↓
(非推奨)Git Credential Manager for Windowsは、資格情報を処理します。 Azure DevOpsおよびGitHubの場合(.NET Framework v4.5.1以降が必要)。

  • None

Do not use a credential helper.
↓↓↓↓↓↓↓
クレデンシャルヘルパーを使用しません。

Configuring extra options

追加オプション

パフォーマンス上がるらしいのでEnable file system cachingだけ選択するかな。

image.png

  • Enable file system caching(ファイルシステム・キャッシュを有効)

File system data will be read in bulk and cached in memry for certain operations ("core.fscache" is set to "true"). This provides a significant performance boost.
↓↓↓↓↓↓↓
ファイルシステムデータは一括で読み取られ、特定の操作のためにメモリにキャッシュされます(「core.fscache」は「true」に設定されます)。これにより、パフォーマンスが大幅に向上します。

  • Enable symbolic links(シンボリックリンクを有効にする)

Enable symbolic links (requires the SeCreateSymbolicLink permission). Please note that existing repositories are unaffected by this setting.
↓↓↓↓↓↓↓
シンボリックリンクを有効にします(SeCreateSymbolicLink権限が必要です)。既存のリポジトリはこの設定の影響を受けないことに注意してください。

Configuring experimental options

実験的なオプション

とりあえずいらんかな。

image.png

  • Enable experimental support for pseudo consoles.(疑似コンソールの実験的サポートを有効)

(NEW!) This allows running native console programs like Node or Python in a Git Bash window without using winpty, but it still has known bugs.
↓↓↓↓↓↓↓
(NEW!)これにより、winptyを使用せずにGit BashウィンドウでNodeやPythonなどのネイティブコンソールプログラムを実行できますが、既知のバグが残っています。

12
15
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
12
15