2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【図解】Windows11にgitをインストールする手順 (2025年12月)

2
Last updated at Posted at 2025-12-24

はじめに

こんにちは。アユタヤです。

今回はWindows11でgitをインストールする手順を見ていきます。

まず以下のページから、Install for Windowsを選択し、gitのインストーラをダウンロードします。

image.png

インストーラ起動後の手順

1 ライセンス確認

image.png

2 インストール場所

image.png

3 コンポーネントの選択

"Add a Gitbash Profile to Windows Terminal"にチェックを入れると、windowsのターミナルで最初からgitbashが扱えるようになります。

参考:
https://developer.mamezou-tech.com/blogs/2023/09/08/windows-terminal-with-git-bash/

image.png

4 スタートメニューにgitを追加

image.png

5 何かの編集の際のエディタを登録

GUI系推奨とのことなのでVSCodeを選択。
あらかじめVSCodeをインストールしておく必要があります。

image.png

6 デフォルトブランチの名前を"main"に

image.png

7 git をいろいろな場所から使えるようにする(推奨のまま)

image.png

8 SSHの設定

個人利用なら基本上で十分。

image.png

9 改行コードの扱い

Windowsで開発するなら上がよさそう。
改行コードについて以下の変換を行う。
LF→CRLF : checkout時
CRLF→LF : commit時
つまりgithub上では常にLF、ローカルではCRLFとなる。

image.png

10 git bashで使用したいコマンドを選択

GitでUnixコマンドを使いたいのでMinTTYとする。

image.png

11 pullの挙動を選択

基本一番上。

image.png

12 Git Credential Managerの有無の選択

GitHubで2段階認証を設定しているときにいい感じの役割を担ってくれそう。とりあえず入れておく。

参考:
https://qiita.com/skkzsh/items/11dd107a0734fec682b8

image.png

13 その他のオプション

そのままの設定でインストール。

image.png

インストール後の画面

image.png

以降、gitbashを立ち上げればgitを利用することができる。

余談

インストールの時の項目とかちょくちょく変わるので、どれを入れるのか判断が難しかったりしますよね()

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?