Introduction to Gitbash and Github

Published: (January 18, 2026 at 03:03 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Definitions

  • Git is a widely used, free, and open‑source system designed to handle projects of all sizes. It enables developers to track changes in code and fosters collaboration.
  • Bash is the default shell on macOS and Linux.
  • Git Bash is a command‑line interface for Microsoft Windows that provides a Unix‑like shell environment for using Git. It is installed locally on personal computers.
  • GitHub is a cloud‑based platform where we store, share, and collaborate on code.

Installation process of Git Bash

  1. Download the appropriate installer for your operating system from the official Git website:
    Git – Installing Git

    Git Bash installer screenshot

  2. Run the downloaded executable file.

  3. Follow the prompts in the setup wizard and configure Git Bash as needed.

  4. Click Install to complete the process.

Verify the installation

git --version

The output should display the installed Git version.

Configure your identity

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

Linking Git Bash and GitHub account

Link your local Git installation to your GitHub account by adding an SSH key to GitHub. This enables secure authentication, collaboration, and automation through the web‑based platform.

Pushing and pulling code using Git

Pulling steps

  1. Ensure you are on the local branch you want to update.

  2. Pull the changes:

    git pull

    git pull is equivalent to:

    git fetch   # downloads content from the remote repository
    git merge   # merges the fetched content into the current branch

Pushing steps

  1. Commit your changes locally.

  2. Push the committed changes to the remote repository:

    git push origin main
    • origin is the default name of the remote repository.
    • main is the name of the branch you are pushing to.
  3. Enter your credentials if prompted.

  4. Verify the push by refreshing the repository on GitHub.

    Git push verification screenshot

Tracking changes

Three core commands are used to track changes:

git status   # shows the state of the working directory and staging area
git add .    # stages all changes for the next commit
git commit -m "Your commit message"   # records the staged changes in the repository

Version control

Version control records changes to files over time, allowing you to recall specific versions later.

Importance of version control

  • Maintains a complete, long‑term history of changes.
  • Enables branching and merging, allowing team members to work on separate streams of changes and later combine them.
  • Facilitates easy tracing of any modifications made in the repository.
Back to Blog

Related posts

Read more »

A NEWBIE'S GUIDE TO GIT(gitbash).

markdown !Githttps://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com...

Introduction to Git and Github

Why version control is important - Every change is recorded - You can go back to older versions of your code - You can see who made a change and when - Multipl...

A Beginner's Guide to Git and GitHub

If you have ever saved a file as final_project.py, then final_project_v2.py, and eventually final_project_v3.py, you have experienced the manual version of vers...