Learn Git and GitHub from basics to advanced with step-by-step tutorials, real-world examples, and best practices for developers.
Start Learning for FreeThis page explains GitHub from zero using simple steps and commands.
GitHub is an online platform used by developers to store, manage, and collaborate on source code using Git.
What is Git? Git is a distributed version control system (VCS) used to track changes in source code and manage different versions of a project.
git --version
What is Git Configuration?
Git configuration means setting up your name and email address in Git so that Git can identify who made each commit.
Whenever you create a commit, Git stores information about the person who made that change.
For example:
This is especially important when working in a team because developers can easily identify who made which changes.
Set your name and email (used in commits)
git config --global user.name "Your Name"git config --global user.email "youremail@gmail.com"
SSH key is used to connect GitHub securely
What is an SSH Key?
SSH (Secure Shell) key is a secure authentication method used to establish a connection between your local computer and GitHub without entering your GitHub password every time.
In Git, SSH authentication uses a pair of keys:
Private Key → Stored securely on your computer. Never share this with anyone.
Public Key → Added to your GitHub account. It can be shared with GitHub.
ssh-keygen -t ed25519 -C "youremail@gmail.com"eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_ed25519clip < ~/.ssh/id_ed25519.pub
After generating the SSH key, the next step is to add your public SSH key to your GitHub account.
Why do we add the SSH key to GitHub?
GitHub needs to know that your computer is authorized to access your repositories.
You add the public key to GitHub, while the private key remains safely on your computer.
ssh -T git@github.com
mkdir my-first-repocd my-first-repogit inittouch README.mdecho "# My First GitHub Project" > README.mdgit add .git commit -m "Initial commit"git remote add origin git@github.com:USERNAME/my-first-repo.gitgit branch -M maingit push -u origin maingit statusgit pullgit pushEdit → Add → Commit → Push
Go to your project folder, right-click, and select Open in Terminal / CMD.
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/USERNAME/REPOSITORY-NAME.git
git branch -M maingit push -u origin main
Your project is now uploaded to GitHub.
Your project is uploaded without using CMD.
Go to your private repository and click on the Settings tab.
From the left menu, select Collaborators.
The invited user must accept the GitHub invitation to gain access.