Git and Github for Beginners

Published: (January 17, 2026 at 02:09 PM EST)
3 min read
Source: Dev.to

Source: Dev.to

What is Git and GitHub?

Git is a version control tool that tracks project files, stores the history of all changes, and logs actions taken by everyone connected to a project. It is essential for teams working on large projects that require version control and future improvements.

GitHub is an online platform that lets team members collect their individual work into a single project directory and collaborate on the combined project. (Other platforms such as GitLab and Bitbucket exist, but this guide focuses on GitHub.)

Installing Git on Windows

  1. Go to the Git official page and download the Windows installer.
  2. Run the setup file and follow the wizard, keeping the default options unless noted otherwise:
StepRecommended Setting
Select ComponentsLeave defaults
Default editor used by GitChoose an installed editor (e.g., Notepad, VS Code, Sublime). If unsure, keep Notepad.
Initial branch nameSelect main
Adjusting your PATH environmentKeep default
Choosing the SSH executableKeep default
HTTPS transport backendNative Windows Secure Channel Library
Line ending conversionsWindows style
Terminal emulator to use Git BashUse MinTTY
Default behavior of git pullFast‑forward or merge
Credential helperNone
Extra optionsEnable file system caching
  1. Finish the installation and launch Git Bash.

Configuring Git

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

Replace the placeholders with your actual name and email.

Verify the installation:

git --version

A version number should be displayed. If an error occurs, repeat the installation steps.

Creating a GitHub Account

  1. Visit github.com and sign up (or log in if you already have an account).
  2. Fill in the required details (email, password, username, country) and complete the registration.

Using SSH eliminates the need to enter your username/password for each push/pull.

ssh-keygen -t rsa -b 4096 -C "your.email@example.com"
  • Press Enter to accept the default file location.
  • Press Enter again for an empty passphrase (or set one if you prefer).

Copy the public key to the clipboard:

clip 

The local folder now mirrors the remote repository.

Creating a New Repository from a Local Folder

If you already have a project locally and want to push it to GitHub:

cd /path/to/your/project
git init
git add .
git commit -m "Initial commit"
git remote add origin 
git push -u origin main

Basic Git Commands for Collaboration

CommandDescription
git pullFetches and merges changes from the remote repository into the current branch.
git add .Stages all modified and new files for the next commit.
git commit -m "message"Records staged changes with a descriptive message.
git pushSends local commits to the remote repository.
git statusShows the current state of the working directory and staging area.
git logDisplays the commit history.

Git Features Overview

  • Branching & Merging – Work on isolated features without affecting the main codebase.
  • Distributed Architecture – Every clone is a full backup of the repository.
  • Staging Area – Fine‑grained control over which changes are included in a commit.
  • Collaboration – Seamless integration with platforms like GitHub for pull requests, code reviews, and issue tracking.
  • History & Revert – Complete change history enables easy rollback to previous states.

These steps provide a solid foundation for using Git and GitHub in team projects. Happy coding!

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...