This section explains how to install Git and how to use it (initial setup + command operation) in an easy-to-understand manner for beginners. We can also provide a guide with a screen, so please let us know if you need it.
1. How to install Git (Windows)
Install from the official website
Download Git from the official website.

| OS | way |
|---|---|
| Windows | .exeand follow the instructions of the installer.This time, I will explain it in this step. |
| macOS | brew install git(Homebrew recommended) or official dmg version |
| Linux | sudo apt install git(Ubuntu), etc., run it in a package manager. |
*X Server VPS is explained separately here↓
Download the installer for your environment.

How to check if your Windows is 64-bit or 32-bit
- Open Settings→ System→ About from the Start menu
- If the System Type says 64-bit operating system, it is 64-bit.
Points to consider when choosing
| choice | Target Audience and Application |
|---|---|
| 32-bit Git for Windows Setup | If you have 32-bit Windows, please select here. |
| 64-bit Git for Windows Setup | If you have a 64-bit Windows, please choose here. In general, this is often the case. This time, I will explain it in this step. |
| Portable(thumbdrive edition) | For Portable users |
| Using winget tool | For advanced players |
How to run the installer
- Click on “64-bit Git for Windows Setup”
- Run the downloaded
.exefile - Proceed with “Next” as instructed by the installer (the basics are OK as they are).
- After the installation is complete, check in the command prompt:
bashcopyeditgit --version
git --versionAfter installation, an example I checked at the command prompt or terminal:
git version 2.48.1.windows.1git version x.xx.x If you see a version like →, you’re successful.
Initial Git setup (only the first time after installation)
Set the name and email address you want to use for commits in Git:
git config --global user.name "あなたの名前"
git config --global user.email "あなたのメールアドレス"To check your settings:
git config --listThings to keep in mind if you already have a GitHub account
In order for your commits to be correctly recognized as your account on GitHub, you need to use the
Gituser.email must match one of the email addresses you have on GitHub.
Gituser.name can be different from your GitHub username, but it’s the “display name” that is recorded in your Git commits.
user.name is recorded in the commit history, but it is user.email the one that is matched to the GitHub account.
Basic usage of Git (local repository)
🔹 Step 1: Initialize the repository
Initializing the repository (git init) is done on a project-by-project basis.
Run the following command in PowerShell:
cd プロジェクトのフォルダ
git initExample in action:
mkdir ~/projects/personal/my-website
cd ~/projects/personal/my-website
git init
.gitThe folder is created and Git management begins.
Step 2: Add and commit files
Add any file to the project folder and commit it.
git add .
git commit -m "初回コミット"Command Explanation
① git add .
Meaning:
Stage (Prepare) all modified files under the current folder (current directory) command.
- 「. (dot)” means “all of this directory and below”.
- All newly created, modified, or deleted files are eligible.
Example:git add . Yes
git add ファイルA
git add フォルダB/ファイルB
...It is the same as doing it all at once.
add is “Preparing to include file changes in the commit”.
It is not saved in the history at this point yet.
② git commit -m "初回コミット"
Meaning:
This command saves staged changes as a single history (commit).
-mis an abbreviation for “message”."初回コミット"Explanatory comments (what did you do) that will remain in the history
By this:
- When, by whom, and what changes are recorded
- You can return to the past later and compare them
troubleshooting
| situation | What to do |
|---|---|
Adding a file does git commit not reflect if it is only | Always need first git add |
| If you forgot to write a message | -m "修正後のコメント" or later git commit --amend -m "修正後のコメント" |
| I want to check the staging | git status Available at |
| I want to see comments | git log |
Step 3: Connect with a remote repository (e.g., GitHub) (optional)
git remote add origin https://github.com/ユーザー名/リポジトリ名.git
git push -u origin main* GitHub linkage will be explained separately.
Step 4: List of frequently used commands
| command | explanation |
|---|---|
git status | Status check |
git add ファイル名 | Staging files |
git commit -m "コメント" | Record changes |
git log | Checking History |
git branch | Branch confirmation and creation |
git checkout -b ブランチ名 | Branch creation + switching |
git push | Reflect remotely |
git pull | Get the latest from remote |
Official documentation
- Git official website
https://git-scm.com/ - Git Official Book (Japanese)
https://git-scm.com/book/ja/v2
Comments