π How to Install Git Bash on Windows and Configure Your Identity Like a Pro
πΉ By Samuel Peter
πΉ Why Git Bash?
In todayβs fast-paced DevOps and software engineering world, Git is an essential skill. Whether youβre a developer, DevOps engineer, or IT professional, understanding how to set up and use Git Bash on Windows is a must!
In this article, I'll walk you through installing Git Bash on Windows, configuring your identity, and verifying your setup. By the end, youβll have a fully configured Git environment, just like mine! π»π₯
πΉ Step 1: Download Git for Windows
To install Git Bash on your Windows PC, follow these steps:
1οΈβ£ Go to the official Git website π https://git-scm.com/downloads
2οΈβ£ Click Windows to download the latest Git version.
3οΈβ£ Once the .exe
file is downloaded, open it to begin installation.
πΉ Step 2: Install Git Bash
1οΈβ£ Run the downloaded .exe
file.
2οΈβ£ Click Next and choose the installation location (default is fine).
3οΈβ£ On the "Select Components" screen, check:
β
Git Bash
β
Git GUI
β
Associate .sh
files with Git Bash
4οΈβ£ Choose the default editor (VS Code is recommended).
5οΈβ£ Select "Use Git from the command line and also from 3rd-party software."
6οΈβ£ Click Next and install Git.
π Done! Git Bash is now installed.
πΉ Step 3: Open Git Bash and Configure Your Identity
After installation, letβs configure Git with your name and email:
1οΈβ£ Open Git Bash (search for it in the Windows Start menu).
2οΈβ£ Run the following command to set your username:
git config --global user.name "Samuel Peter"
3οΈβ£ Set your email (use the one linked to your GitHub account):
git config --global user.email "samuelpeterchinonso@gmail.com"
4οΈβ£ Verify your configuration:
git config --list
Your Git identity is now set up! ππ
πΉ Step 4: Create Your First Git Repository
Letβs test if Git is working by creating a sample repository:
1οΈβ£ Create a new folder and navigate to it in Git Bash:
mkdir my-first-git-repo
cd my-first-git-repo
2οΈβ£ Initialize an empty Git repository:
git init
3οΈβ£ Create a sample file and add it to Git:
echo "Hello, Git!" > README.md
git add README.md
git commit -m "First commit"
Your Git repository is ready! ππ
πΉ Conclusion
Now you have Git Bash installed and configured on Windows! Youβve set up your identity, initialized a Git repository, and made your first commit. This is just the beginning of your Git journey! ππ
If you found this guide helpful, share it with your network! πͺ Drop a comment below if you have any questions.
Top comments (1)
awesome