Git Essentials for Beginners

Published: (January 17, 2026 at 01:41 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

This guide introduces beginners to the core concepts of Git, the leading version control system. You’ll learn what version control is, why it matters, and how to track file changes. Step‑by‑step, we’ll cover staging and committing work to build a clear project history. You’ll also see how to push code to GitHub and pull updates to stay in sync. By the end, you’ll master the everyday Git workflow: track → commit → push → pull.

Git Bash vs GitHub

Git Bash

A command‑line tool on your computer used to run Git commands (clone, commit, push). It works locally, basically where you type commands.

GitHub

An online platform (website) used to store, share, and collaborate on Git repositories in the cloud. It’s where your code is stored and shared online.

Importance of Git

  • Version control – Tracks changes and allows rollback to earlier versions.
  • Cloud backup – Code is safely stored online.
  • Collaboration – Multiple people can work on the same project.
  • Portfolio building – Showcases skills to employers.
  • Code review – Improves quality through pull requests and comments.
  • Industry standard – Widely used across tech and IT roles.

Git Bash Installation

  1. Go to the Git website and install Git Bash.
  2. Open the search bar, type “Git Bash”, and verify that the installation completed.
  3. Click the Git Bash icon to open the Git command line.

Connecting Git Bash to a GitHub Account

1. Check the installed Git Bash version

git --version

Git version output

2. Configure identity on Git Bash

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

3. Verify the name and email configuration

git config --global --list

Git config list output

4. Generate an SSH key and add it to the SSH agent

# Generate a new SSH key (replace the email with your own)
ssh-keygen -t ed25519 -C "you@example.com"

# When prompted for a file location, just press Enter
# When prompted for a passphrase, press Enter (or set one if you prefer)

Start the SSH agent and add the key:

eval "$(ssh-agent -s)"

SSH agent output

Explanation of the command

  • eval – Executes the text output of the command that follows.
  • ssh-agent – A helper program that holds your keys in memory.
  • -s – Formats the output as shell commands.
  • $(...) – Runs the enclosed command first and substitutes its output.

You are now ready to use Git Bash locally and connect securely to GitHub with SSH. Happy coding!

Back to Blog

Related posts

Read more »