Introduction to Gitbash and Github
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
-
Download the appropriate installer for your operating system from the official Git website:
Git – Installing Git
-
Run the downloaded executable file.
-
Follow the prompts in the setup wizard and configure Git Bash as needed.
-
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
-
Ensure you are on the local branch you want to update.
-
Pull the changes:
git pullgit pullis equivalent to:git fetch # downloads content from the remote repository git merge # merges the fetched content into the current branch
Pushing steps
-
Commit your changes locally.
-
Push the committed changes to the remote repository:
git push origin mainoriginis the default name of the remote repository.mainis the name of the branch you are pushing to.
-
Enter your credentials if prompted.
-
Verify the push by refreshing the repository on GitHub.

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.