Skip to content

Latest commit

 

History

History
172 lines (119 loc) · 1.91 KB

File metadata and controls

172 lines (119 loc) · 1.91 KB

🟡 Git Intermediate Cheat Sheet

“Now you control branches, history, and collaboration.”


🧠 Workflow Upgrade

flowchart LR
    A[Feature Branch] --> B[Commit]
    B --> C[Rebase/Merge]
    C --> D[Push]
Loading

🌿 Branching Power

git switch -c feature-x
git branch -d feature-x
git switch -

🔀 Merge vs Rebase

Merge  = combine history (safe)
Rebase = clean history (linear)

graph LR
    A --> B --> C
    B --> D --> E
Loading

⚔️ Conflict Resolution

<<<<<<< HEAD
=======
>>>>>>> branch

Steps

# edit file
git add .
git commit

🔄 Undo & Fix

git reset --soft HEAD~1
git reset HEAD~1
git revert <commit>

📦 Stash

git stash
git stash pop
git stash list

🧠 Debug Toolkit

git log --oneline --graph --all
git diff
git show <commit>

🌍 Remote Collaboration

git pull --rebase
git push --force-with-lease

⚡ Intermediate Workflow

git switch -c feature
git add .
git commit -m "feature"
git pull --rebase
git push

⚠️ Mistakes to Avoid

❌ force push blindly
❌ ignoring conflicts
❌ large commits

🧠 Golden Thinking

flowchart TD
    A[Problem] --> B[Check status]
    B --> C[Check log]
    C --> D[Fix]
Loading

🏁 Outcome

You can collaborate and manage real workflows


🔥 Optional Upgrade (Highly Recommended)

Fix typo in structure:

intermidiate-cheatsheet.md ❌
intermediate-cheatsheet.md ✅

🚀 Final Impact

flowchart LR
    A[Beginner Sheet] --> B[Clarity]
    B --> C[Intermediate Sheet]
    C --> D[Control]
    D --> E[Mastery 🚀]
Loading

🏁 Final Thought

“Cheat sheets don’t replace learning — they make recall instant.”