前回に引き続き、プログラムなどのバージョン管理を行える、無料のソースコード管理 (SCM: software configuration management) ソフト Git をインストールする手順を紹介します。
Windows (64 bit) 版のインストーラをダウンロードして、インストーラの各ページの設定を Google 翻訳の日本語の文章で確認しながらインストールします。
※既定のエディタ以外は、インストーラの設定を変更しないでインストールしました。

※Git-2.49.0 (64 bit) を使用します。
前半の記事
git のインストール(前半)は以下の記事を参照してください。
git のインストール(後半)
前回に引き続き、インストーラの英文を日本語に Google 翻訳しながら、設定を選択して、インストールを行います。
※前回の「既定のエディタの選択」以外は、全てのページで、最初に選択されている状態で進めています。
改行コードの扱いの選択
改行コードの扱いを選択します。
Checkout Windows-style, commit Unix-style line endings を選ぶと、Windows スタイルの行末 (CRLF) でチェックアウトし、Unix スタイルの行末 (LF) でコミットします。

Configuring the line ending conversions
行末変換の構成Checkout Windows-style, commit Unix-style line endings
Windows スタイルの行末をチェックアウトし、Unix スタイルの行末をコミットするGit will convert LF to CRLF when chcking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setteing 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 commiting text files. Choosing this option is not recommended for cross-platform projects(“core.autocrlf” is set to “false”).
Git インストーラの英文と Google 翻訳
Git は、テキスト ファイルをチェックアウトまたはコミットするときに変換を実行しません。このオプションの選択は、クロスプラットフォーム プロジェクトでは推奨されません (「core.autocrlf」が「false」に設定されている)。
使用するターミナルエミュレータの選択
使用するターミナルエミュレータを選択します。
Use MinTTY (the default terminal of MSYS2) を選択すると、高機能なターミナルエミュレータを winpty 経由で使用します。
#もう一方は Windows のコマンドプロンプトなので、そちらを選ぼうと思ったのですが、MinTTY のほうが便利そうなので、初期設定から変更しませんでした。
[Git Bash] winpty コマンドについて調べてみた | MSeeeeN
winpty
コマンドは、 Windows のコンソールプログラムと UNIX の仮想端末を通信させるためのインタフェース です。

Configuring the terminal emulator to use with Git Bash
Git Bash で使用するターミナル エミュレーターの構成Which terminal emulator do you wanto to use with your Git Bash?
Git Bash でどのターミナル エミュレータを使用したいですか?Use MinTTY (the default terminal to MSYS2)
MinTTY (MSYS2 のデフォルト端末) を使用しますGit Bash will use MinTTY as terminal 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
towork 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 より前では、そのウィンドウは自由にサイズ変更できず、長方形のテキストの選択のみが可能でした。
Git インストーラの英文と Google 翻訳
「git pull」のデフォルトの動作の選択
「git pull」のデフォルトの動作を選択します。
Fast-forward or merge を選択すると、必要に応じてマージをします。
Rebase は、merge と似た git のコマンドです。
Git – リベース
rebase
コマンドを使用すると、一方のブランチにコミットされたすべての変更をもう一方のブランチで再現することができます。

Choose the default behavior of
git pull
「git pull」のデフォルトの動作を選択します。What should
git pull
do by default?
「git pull」はデフォルトで何をすべきでしょうか?Fast-forward or merge
早送りまたは結合Fast-forward the current branch to the fetched branch when possible, otherwise create a merge commit.
可能であれば、現在のブランチをフェッチされたブランチに早送りします。そうでない場合は、マージ コミットを作成します。Rebase
リベースRebase the current branch onto the fetched branch. If there are no local commits to rebase, this is equivalent to a fast-forward.
現在のブランチをフェッチされたブランチにリベースします。リベースするローカル コミットがない場合、これは早送りと同じですOnly ever fast-forward
早送りのみFast-forward to the fetched branch. Fail if that is not possible.
Git インストーラの英文と Google 翻訳
This is the standard behaivior ofgit pull
.
フェッチされたブランチまで早送りします。それが不可能な場合は失敗します。
これは「git pull」の標準的な動作です。
認証情報ヘルパーの選択
認証情報ヘルパーを選択します。
Git Credential Manager を選択すると、 cross-platform Git Credential Manager を使用します。
Git Credential Manager (GCM) is a secure Git credential helper built on .NET that runs on Windows, macOS, and Linux. It aims to provide a consistent and secure authentication experience, including multi-factor auth, to every major source control hosting service and platform.
Git Credential Manager (GCM) は、Windows、macOS、および Linux 上で実行される .NET 上に構築された安全な Git 資格情報ヘルパーです。あらゆる主要なソース管理ホスティング サービスおよびプラットフォームに、多要素認証を含む一貫した安全な認証エクスペリエンスを提供することを目的としています。git-ecosystem/git-credential-manager: Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services. と Google 翻訳
※「cross-platform Git Credential Manager」のリンク先は「git-ecosystem/git-credential-manager: Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.」でした。
※「here」のリンク先は「git-credential-manager/docs/faq.md at b62021fdd7f0e28bf851580e0afd834976bd79d1 · git-ecosystem/git-credential-manager」でした。

Choose a credential helper
認証情報ヘルパーを選択してくださいWhich credential helper should be configured?
どの資格情報ヘルパーを構成する必要がありますか?Git Credential Manager
Use the cross-platform Git Credential Manager.
See more information about the future of Git Credential Manager here.
クロスプラットフォームの Git Credential Manager を使用します。
Git Credential Manager の今後の詳細については、こちらをご覧ください。None
Do not use a credential helper.
Git インストーラの英文と Google 翻訳
資格情報ヘルパーは使用しないでください。
追加オプションの選択
追加オプションを取捨選択します。
Enable file system caching をチェックすると、ファイルシステムのキャッシュを有効にします。
※「symbolic links」のリンク先は「Symbolic Links · git-for-windows/git Wiki」でした。
Install ボタンを押すと、選択してきた設定で Git がインストールされます。

Configuring extra options
追加オプションの構成Which features would you like to enable?
どの機能を有効にしますか?Enable file system caching
ファイルシステムのキャッシュを有効にするFile system data will be read in bulk and cached in memory 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).
Git インストーラの英文と Google 翻訳
Please note that existing repositories are unaffected by this setting.
シンボリック リンクを有効にします (SeCreateSymbolicLink 権限が必要です)。
既存のリポジトリはこの設定の影響を受けないことに注意してください。
インストールの完了とリリースノートの表示
選択してきた設定で Git がインストールされます。

インストールが完了したら Finish ボタンでインストーラを閉じます。

最初からチェックされている View Release Notes のチェックをつけたままインストーラを閉じると、インストールされたファイル群の中からリリースノートの HTML が開かれて Git for Windows Release Notes を閲覧できます。
※既定のインストールフォルダにインストールした場合 file:///C:/Program%20Files/Git/ReleaseNotes.html が開かれます。

まとめ
前回と今回で、プログラムなどのバージョン管理を行える、無料のソースコード管理 (SCM: software configuration management) ソフト Git をインストールする手順を紹介しました。
Windows (64 bit) 版のインストーラをダウンロードして、インストーラの各ページの設定を Google 翻訳の日本語の文章で確認しながらインストールしました。
参照サイト Thank You!
- Git
- Regarding Git and Branch Naming – Software Freedom Conservancy
- git-ecosystem/git-credential-manager: Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
- git-credential-manager/docs/faq.md at b62021fdd7f0e28bf851580e0afd834976bd79d1 · git-ecosystem/git-credential-manager
- Symbolic Links · git-for-windows/git Wiki
- Git – リベース
- Secure Shell – Wikipedia
- [Git Bash] winpty コマンドについて調べてみた | MSeeeeN
記事一覧 → Compota-Soft-Press
コメント