TGViewer
Web Development Web Development @web_dev_bds Β· 4.43K subscribers
Post #768 369
βœ… Version Control with Git & GitHub πŸ—‚οΈ

Version control is a must-have skill in web development! It lets you track changes in your code, collaborate with others, and avoid "it worked on my machine" problems πŸ˜…

πŸ“Œ What is Git? 
Git is a distributed version control system that lets you save snapshots of your code.

πŸ“Œ What is GitHub? 
GitHub is a cloud-based platform to store Git repositories and collaborate with developers.

πŸ› οΈ Basic Git Commands (with Examples)

1️⃣ git init 
Initialize a Git repo in your project folder.
git init


2️⃣ git status 
Check what changes are untracked or modified.
git status


3️⃣ git add 
Add files to staging area (preparing them for commit).
git add index.html
git add.     # Adds all files


4️⃣ git commit 
Save the snapshot with a message.
git commit -m "Added homepage structure"


5️⃣ git log 
See the history of commits.
git log


🌐 Using GitHub

6️⃣ git remote add origin 
Connect your local repo to GitHub.
git remote add origin https://github.com/yourusername/repo.git


7️⃣ git push 
Push your local commits to GitHub.
git push -u origin main


8️⃣ git pull 
Pull latest changes from GitHub.
git pull origin main


πŸ‘₯ Collaboration Basics

πŸ”€ Branching & Merging
git branch feature-navbar
git checkout feature-navbar
# Make changes, then:
git add.
git commit -m "Added navbar"
git checkout main
git merge feature-navbar


πŸ” Pull Requests 
Used on GitHub to review & merge code between branches.

🎯 Project Tip: 
Use Git from day 1, even solo projects! It builds habits and prevents code loss.
More from @web_dev_bds
  1. Oct 15, 2026Websites to Learn Every Technology
  2. Oct 13, 2026Docker vs Kubernetes
  3. Oct 12, 2026Post #1054
  4. Oct 11, 2026CSS Tip Stop centring tooltips with πšπš›πšŠπš—πšœπš•πšŠπšπšŽ: -𝟻𝟢%. near the edge of the scree…
  5. Oct 9, 2026JavaScript CheatSheet
  6. Oct 8, 2026πŸ“•Pro tip if you're using Postgres: Set `application_name` in your app's DB connector/ORM/…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’