Opening episode of the series: basic terminal skills, installing Git on Linux, macOS, and Windows, configuring your global identity, and setting up SSH keys and GitHub CLI so you are ready to practice.

Welcome to the Learn Git & GitHub series! Over the next 21 episodes, we will build your Git mastery from zero: starting from why Git was born, all the way to production-ready team collaboration workflows on GitHub — complete with branching, pull requests, and CI/CD automation.
Git is not just a tool to "save file versions". Git is the foundation of nearly all modern software development — every public or private repository is managed through Git. If you master Git professionally, you can contribute to open source, work in large teams, and understand CI/CD pipelines more deeply.
Episode 0 is all about foundations. Its single goal: make sure your environment is ready. A terminal you are comfortable with, Git installed and configured correctly, an active GitHub account, and working authentication. Serious hands-on material starts in episode 1.
Git is a CLI (Command Line Interface) tool. Using Git without being comfortable in the terminal is like driving a car without holding the steering wheel — every Git command runs from there. So before installing Git, make sure you master these four core commands.
Try it out right away:
pwd
ls
cd ~
cd Documents
ls -la
cd ..pwd — shows your current working directory.ls — lists folder contents; ls -la shows full details including hidden files.cd — changes directory; cd ~ goes to your home directory, cd .. moves up one level to the parent folder.The path concept is important to understand: absolute paths start from the root / (e.g. /home/arman/project), while relative paths start from the current folder (e.g. docs/). Git often shows relative paths in its output, so getting used to reading paths will help you a lot.
mkdir belajar-git
cd belajar-git
mkdir docs src
clearmkdir creates a folder (add -p to create nested folders at once), and clear clears the screen so output does not pile up.
| OS | Terminal | Default start folder |
|---|---|---|
| Linux/macOS | Terminal / iTerm | /home/<user> / /Users/<user> |
| Windows | PowerShell / Git Bash | C:\Users\<user> |
Do not worry about these differences — Git works identically on all systems. The key point: wherever you work, create one dedicated folder for practice projects, e.g. ~/belajar-git (~ always means your home directory).
The current stable version of Git (as of 2026) is on the 2.4x release. The installation method differs by operating system, but the result is the same.
sudo apt update
sudo apt install -y gitbrew install gitDownload the official installer from the Git for Windows site and run it. During installation, choose the recommended options. This installation brings Git Bash — a Linux-style terminal that keeps the Git experience on Windows comfortable.
Once installed, verify from the terminal:
git --versionIf it prints git version 2.4x.x, Git is ready. Keep this version number as proof that the installation succeeded.
Every commit in Git stores the author's name and email. Without an identity, Git refuses to create commits. This configuration only needs to be done once — it applies to every repository on your computer.
git config --global user.name "Nama Kalian"
git config --global user.email "email@kalian.com"
git config --global init.defaultBranch mainuser.name — the name that appears as the commit author.user.email — ideally use an email linked to your GitHub account so commits are tied to your profile.init.defaultBranch main — ensures new repositories use a main branch named main (the modern standard since 2020; previously master).Check your configuration with git config --global --list. All of these settings are stored in the ~/.gitconfig file.
Tip
Use the same email for Git and GitHub. Your commits will automatically be linked to your GitHub profile so your contributions are recorded correctly on your profile page.
Git runs locally, but most of your work involves remotes. GitHub is the most popular Git hosting platform in the world. Register a free account at github.com first.
Instead of typing a password for every push, use an SSH key — a pair of cryptographic keys: the private key stays secret on your computer, and the public key is given to GitHub.
ssh-keygen -t ed25519 -C "email@kalian.com"Press Enter to accept the default location, then optionally add a passphrase. When done, display the public key and copy it to GitHub:
cat ~/.ssh/id_ed25519.pubOn GitHub, go to Settings → SSH and GPG keys → New SSH key, paste the output above, then save.
Note
Use the ed25519 algorithm — modern, fast, and more secure than the older RSA. Nearly all modern Git services support it.
GitHub CLI (gh) simplifies everything — authentication, creating repositories, even pull requests — directly from the terminal.
brew install gh
gh auth loginFollow the gh auth login interaction: choose the browser login option, and GitHub CLI will manage your credentials automatically.
Most Git interactions can be done from the terminal, but visualizations help a lot early on. Install VS Code and two extensions:
cd ~/belajar-git
code .The code . command opens the current folder in VS Code. GitLens will work automatically as soon as you open a Git repository.
Episode 0 is done. Here is what you must bring with you:
cd, ls, mkdir, and clear — the gateway to all Git commands.user.name, user.email, and init.defaultBranch main globally.gh auth login.Make sure everything is installed and working, because in episode 1 we dive into the most important conceptual part: the history of Version Control Systems, the problems Git solves, and why Git became the industry standard. Welcome to the world of Git!