- A repository on GitHub works like a folder where all your code is stored.
- You can create and publish repositories to share your projects or code.
- Edit your GitHub profile by adding your name, bio, social links, and portfolio link.
- This makes your profile look more professional and helps others know more about you.
- After editing your code, use “Commit Changes” to save and track your modifications on GitHub.
- You can follow other developers, teachers, or friends on GitHub to stay updated with their latest code and repositories.
- When you follow someone, you can easily see their latest updates without visiting their profile repeatedly.
- Forking means copying someone else’s repository into your own GitHub account.
- This allows you to use their code, explore it, and even make your own changes.
- GitHub automatically shows the source repository where the code came from.
- Instead of asking repeatedly for code, you can fork or download repositories directly to your account.
- This helps you keep track of new updates easily through your GitHub feed.
- Follow people who share valuable projects and clean code — it helps you learn faster.
- Having active connections in the GitHub community exposes you to good coding practices and real-world examples.
- You cannot directly change someone else’s repository without permission.
- To contribute, you must send a pull request, which the owner can review and merge if approved.
- Every developer should have a GitHub account to showcase their projects, collaborate, and build a professional portfolio.
- Create your profile, upload code, and start connecting with the global developer community.
Welcome to the ultimate guide for mastering Git, GitHub, and React.js — from beginner to professional developer level.
This file covers everything from Git setup and commands to React project structure and professional developer mindset tips.
GitHub is an open-source platform used for hosting and sharing code.
You can push your code to GitHub using:
- Git Desktop (GUI) — beginner-friendly
- Git Bash (CLI) — professional and widely used
💡 Version Control helps developers manage and track changes made by multiple people in the same project.
| Platform | Description |
|---|---|
| GitHub | Most popular for open-source projects |
| GitLab | Used in enterprise environments |
| Bitbucket | Integrated with Jira and Atlassian tools |
All platforms use similar Git commands — only the interface and hosting differ.
There are two main ways:
- Git Desktop → beginner-friendly
- Git Bash / Command Line → professional, recommended
- Go to GitHub → New Repository
- Name it (e.g.,
ABC-Website) - Choose visibility:
- Public: Anyone can view
- Private: Only invited users can access
- Click Create Repository
- Copy the repository URL
- Open your project folder → Right-click → Open Git Bash Here
- Run these commands:
# Initialize Git
git init
# Add all files
git add .
# Check status
git status
# Commit files
git commit -m "Initial commit"
# Configure user info (only once)
git config --global user.name "YourName"
git config --global user.email "youremail@example.com"
# Add remote origin (paste repo URL)
git remote add origin https://github.com/YourUsername/ABC-Website.git
# Push code to main branch
git push -u origin main| Command | Description |
|---|---|
git pull |
Fetch and merge latest changes |
git push |
Send local commits to remote repo |
git add |
Stage changes for commit |
git commit |
Save changes locally |
git status |
Show current working state |
Branch |
A separate line of development |
Merge |
Combine code from different branches |
Conflict |
Happens when multiple edits clash |
- Each developer works on a separate branch
- Before pushing, always pull the latest code
- Resolve merge conflicts manually if needed
- After testing, merge into the main branch
- Files over 100MB cannot be uploaded directly
- Use meaningful commit messages, e.g.,
✅Added navbar component
❌update
If Git suggests:
git push --set-upstream origin mainIt means you’re linking your local branch with the remote main branch.
After that, simply use:
git pushA branch is a separate workspace within your repo.
Example:
git checkout -b sadiq
git branch
checkout -b→ create and switch to a new branch
All new commits now belong to your new branch.
git add .
git commit -m "Added header section"
git pushIf it’s a new branch’s first push:
git push --set-upstream origin branch-nameA Pull Request (PR) = asking to merge your branch code into another branch (usually main).
Steps:
- Go to your repo → Compare & Pull Request
- Review code changes
- Click Merge Pull Request if approved
Conflicts occur when multiple edits affect the same file or line.
Always run before pushing:
git pull origin mainThen fix conflicts → commit → push again.
You can host static websites on GitHub for free.
Steps:
- Ensure project has
index.htmlin the root - Go to Settings → Pages
- Choose branch → Save
- Wait 30–60 seconds
Your site will appear at:
https://yourusername.github.io/repository-name/
| Command | Description |
|---|---|
git init |
Initialize repo |
git add . |
Stage files |
git commit -m "" |
Save changes |
git branch |
List branches |
git checkout -b |
Create & switch branch |
git push |
Upload to GitHub |
git pull |
Get latest changes |
git merge |
Merge branches |
git push -f |
Force push (use carefully) |
- Always use new branches for new features
- Write clear commit messages
- Pull latest code before pushing
- Review PRs before merging
- Keep
index.htmlat root for deployment
Before applying for jobs:
- Create a 1-page resume
- Focus on strong projects, not certificates
- Keep GitHub clean and public
- Build a portfolio website
One meaningful project > Ten small static pages
Create apps that solve problems:
- Password Generator 🔐
- File Sharing App 📁
- Blog App ✍️
- Quiz App 🎯
🕒 “One focused hour daily can change your career.”
Be consistent — even 1 hour a day compounds.
React is an open-source JavaScript library for building dynamic and interactive user interfaces, maintained by Meta (Facebook).
npm create vite@latest my-react-app
cd my-react-app
npm install
npm run devVite is preferred over CRA because it’s faster and lightweight.
✅ Reusable Components
✅ Faster Performance (Virtual DOM)
✅ Modular, Maintainable Code
A component is a reusable piece of UI logic.
Example:
function Header() {
return <h1>Welcome to My Website</h1>;
}
export default Header;Use anywhere:
<Header />my-react-app/
├── public/
│ ├── images/
│ ├── audio/
│ └── videos/
├── src/
│ ├── assets/
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
├── .gitignore
├── package.json
└── vite.config.js
| File | Purpose |
|---|---|
index.html |
Root of the app |
main.jsx |
Entry point |
App.jsx |
Root component |
.gitignore |
Exclude files like node_modules |
- CSS Modules (Recommended)
- Tailwind CSS
- Inline Styles (Avoid)
Example CSS Module:
/* Header.module.css */
.title {
color: blue;
}npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -pThen add Tailwind directives to your index.css.
git init
git add .
git commit -m "Initial React setup"
git remote add origin https://github.com/yourusername/my-react-app.git
git push -u origin mainFuture pushes:
git add .
git commit -m "Updated App component"
git pushgit clone https://github.com/username/repo.git
cd repo
npm install
npm run dev| Command | Description |
|---|---|
npm run dev |
Start React app locally |
npm install |
Install dependencies |
git add . |
Stage changes |
git commit -m |
Save changes |
git push |
Upload to GitHub |
npm run build |
Build for production |
- Use modular components
- Avoid inline styles
- Never push
node_modules - Learn props & state early
- Build small apps to strengthen concepts
Steps to Become a Professional Developer:
- Build strong foundations
- Learn JavaScript → React → Next.js
- Push code regularly on GitHub
- Create real-world projects
- Stay consistent — daily improvement matters
💬 "Code, Commit, Collaborate — and never stop learning."