How to Use GitHub Complete Beginner Guide (2026)
How to Use GitHub Complete Beginner Guide (2026)
GitHub is the most important tool every programmer must know.
Every developer, every company, every open source project uses GitHub. Without GitHub knowledge you are missing a critical skill that every employer expects.
This complete guide covers everything you need to know about GitHub from scratch.
Let's get started.
1. What is GitHub?
GitHub is a platform for storing, sharing and collaborating on code.
Think of GitHub as:
- Google Drive but for code
- Social media but for developers
- A portfolio platform for programmers
Key terms:
| Term | Meaning |
|---|---|
| Git | Version control system — tracks code changes |
| GitHub | Online platform that hosts Git repositories |
| Repository | Folder containing your project and its history |
| Commit | Saving a snapshot of your code |
| Branch | Separate version of your code |
| Merge | Combining branches together |
| Clone | Downloading a repository to your computer |
| Fork | Creating your own copy of someone else's repo |
| Pull Request | Requesting to merge your changes |
2. Why Every Programmer Needs GitHub
| Reason | Details |
|---|---|
| Portfolio | Show your work to employers |
| Backup | Never lose your code again |
| Collaboration | Work with other developers |
| Version control | Track every change you make |
| Open source | Contribute to real projects |
| Job hunting | Employers check GitHub profiles |
| Learning | Study other developers code |
3. Install Git
GitHub requires Git installed on your computer.
Windows
- Go to git-scm.com
- Download Git for Windows
- Install with default settings
- Open Command Prompt and verify:
git --versionMac
# Using Homebrew
brew install git
# Verify
git --versionLinux (Ubuntu)
sudo apt update
sudo apt install git
# Verify
git --version4. Configure Git
After installing set up your identity:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
# Verify configuration
git config --list5. Create Your GitHub Account
Steps:
- Go to github.com
- Click Sign Up
- Enter username, email and password
- Choose free plan
- Verify your email
- Complete profile setup
Profile Tips:
- Use professional username
- Add profile picture
- Write a short bio
- Add your location
- Pin your best repositories
6. Create Your First Repository
On GitHub Website:
- Click + icon top right
- Click New Repository
- Enter repository name
- Add description
- Choose Public or Private
- Check Add README file
- Click Create Repository
7. Core Git Commands
These are the commands you will use every single day:
Initialize a new repository
git initCheck status of files
git statusAdd files to staging area
# Add specific file
git add filename.py
# Add all files
git add .Commit changes
git commit -m "Your commit message here"View commit history
git log
# Compact view
git log --onelineConnect to GitHub repository
git remote add origin https://github.com/username/repository.gitPush code to GitHub
git push origin mainPull latest changes
git pull origin mainClone a repository
git clone https://github.com/username/repository.git8. Complete Git Workflow
This is the workflow you will follow every time you code:
# Step 1 - Check what changed
git status
# Step 2 - Add your changes
git add .
# Step 3 - Commit with message
git commit -m "Added Python functions module"
# Step 4 - Push to GitHub
git push origin mainDo this every time you finish a coding session. ✅
9. Working with Branches
Branches let you work on new features without affecting main code.
Create a new branch
git branch feature-loginSwitch to branch
git checkout feature-login
# Create and switch in one command
git checkout -b feature-loginList all branches
git branchMerge branch into main
# Switch to main first
git checkout main
# Merge feature branch
git merge feature-loginDelete branch after merging
git branch -d feature-login10. The README File
Every good GitHub repository needs a README.md file.
What to include in README:
| Section | Content |
|---|---|
| Project title | Name of your project |
| Description | What the project does |
| Installation | How to install and run |
| Usage | How to use the project |
| Screenshots | Show the project in action |
| Technologies | What you used to build it |
| License | How others can use your code |
Example README structure:
# Project Name
A brief description of what this project does.
## Installation
pip install -r requirements.txt
## Usage
python main.py
## Technologies Used
- Python 3.11
- Flask
- SQLite
## License
MIT License11. Forking and Contributing
Fork a Repository
- Find a repository you want to contribute to
- Click Fork button top right
- This creates your own copy
Make Changes and Create Pull Request
- Clone your forked repository
- Create a new branch
- Make your changes
- Push to your fork
- Click New Pull Request
- Describe your changes
- Submit for review
12. GitHub for Python Projects
Typical Python Project Structure on GitHub
my-python-project/
│
├── README.md
├── requirements.txt
├── .gitignore
├── main.py
├── src/
│ ├── __init__.py
│ ├── module1.py
│ └── module2.py
├── tests/
│ └── test_main.py
└── docs/
└── documentation.mdThe .gitignore File
Tell Git which files to ignore:
# Python .gitignore
__pycache__/
*.py[cod]
*.so
.env
venv/
.venv/
*.egg-info/
dist/
build/
.pytest_cache/
.DS_Storerequirements.txt
List all project dependencies:
# Generate requirements.txt
pip freeze > requirements.txt
# Install from requirements.txt
pip install -r requirements.txt13. GitHub Pages
Host your website for free using GitHub Pages.
Steps:
- Create repository named username.github.io
- Add your HTML CSS JS files
- Go to Settings → Pages
- Select main branch as source
- Your site is live at username.github.io
14. Useful GitHub Features
| Feature | What It Does |
|---|---|
| Issues | Track bugs and feature requests |
| Projects | Kanban board for managing tasks |
| Actions | Automate workflows and CI/CD |
| Wiki | Documentation for your project |
| Releases | Version your software releases |
| Gists | Share small code snippets |
| Stars | Bookmark interesting repositories |
| Watch | Get notifications for repositories |
15. GitHub for Job Hunting
Employers check your GitHub profile. Make it count.
Profile Checklist
| Item | Status |
|---|---|
| Professional username | ✅ |
| Profile picture | ✅ |
| Bio with skills | ✅ |
| Pinned repositories | ✅ |
| Green contribution graph | ✅ |
| README on profile | ✅ |
| At least 5 projects | ✅ |
Create a Profile README
- Create repository with same name as your username
- Add README.md to it
- This README appears on your profile
Example profile README:
# Hi I am Rahul 👋
Python Developer | AI Enthusiast | Open Source Contributor
## Skills
- Python | Django | Flask
- Machine Learning | TensorFlow
- Data Science | Pandas | NumPy
## Projects
- CodeMindset Blog — Python tutorials and AI guides
- Price Tracker — Python web scraping tool
- Sentiment Analyzer — NLP project
## Connect
- Pinterest: CodeMindset
- Blog: codemindset1.blogspot.com16. Common Git Mistakes and Fixes
| Mistake | Fix |
|---|---|
| Wrong commit message | git commit --amend -m "new message" |
| Accidentally added wrong file | git reset HEAD filename |
| Need to undo last commit | git reset --soft HEAD~1 |
| Accidentally deleted file | git checkout -- filename |
| Wrong branch | git checkout correct-branch |
| Merge conflict | Edit conflicted files manually then commit |
17. Git Commands Quick Reference
| Command | Purpose |
|---|---|
| git init | Initialize repository |
| git clone URL | Clone repository |
| git status | Check file status |
| git add . | Stage all changes |
| git commit -m "" | Commit changes |
| git push origin main | Push to GitHub |
| git pull origin main | Pull from GitHub |
| git branch | List branches |
| git checkout -b name | Create and switch branch |
| git merge branch | Merge branch |
| git log --oneline | View commit history |
| git diff | See unstaged changes |
| git stash | Temporarily save changes |
Final Words
GitHub is not optional for programmers in 2026. It is essential.
Every project you build should be on GitHub.
Start today:
- Create GitHub account
- Install Git on your computer
- Push your existing Python projects to GitHub
- Commit code every single day
- Build a green contribution graph
The green squares on your GitHub contribution graph are proof of your consistency to every employer who checks your profile.
Keep learning. Keep building. 🚀
Follow CodeMindset on Pinterest for coding guides, Python tutorials and developer tips.
Comments
Post a Comment