TGViewer
Python Projects & Free Books Python Projects & Free Books @pythonfreebootcamp Β· 40.6K subscribers
Post #1123 1.3K
Git Commands

πŸ›  git init – Initialize a new Git repository
πŸ“₯ git clone <repo> – Clone a repository
πŸ“Š git status – Check the status of your repository
βž• git add <file> – Add a file to the staging area
πŸ“ git commit -m "message" – Commit changes with a message
πŸš€ git push – Push changes to a remote repository
⬇️ git pull – Fetch and merge changes from a remote repository


Branching

πŸ“Œ git branch – List all branches
🌱 git branch <name> – Create a new branch
πŸ”„ git checkout <branch> – Switch to a branch
πŸ”— git merge <branch> – Merge a branch into the current branch
⚑️ git rebase <branch> – Apply commits on top of another branch


Undo & Fix Mistakes

βͺ git reset --soft HEAD~1 – Undo the last commit but keep changes
❌ git reset --hard HEAD~1 – Undo the last commit and discard changes
πŸ”„ git revert <commit> – Create a new commit that undoes a specific commit


Logs & History

πŸ“– git log – Show commit history
🌐 git log --oneline --graph --all – View commit history in a simple graph


Stashing

πŸ“₯ git stash – Save changes without committing
🎭 git stash pop – Apply stashed changes and remove them from stash


Remote & Collaboration

🌍 git remote -v – View remote repositories
πŸ“‘ git fetch – Fetch changes without merging
πŸ•΅οΈ git diff – Compare changes


Don’t forget to react ❀️ if you’d like to see more content like this!
  • πŸ‘ 4
More from @pythonfreebootcamp
  1. Oct 2, 2026Data Analytics A-Z
  2. Sep 25, 2026🎯 GigaChat 3.5 Reasoning: 5 Key Features 1️⃣ Advanced Reasoning: Explores multiple step-b…
  3. Sep 19, 2026Let’s dive into our first mini project using Python: Project 1: Number Guessing Game 🎯 Go…
  4. Sep 14, 2026Learn AI for Free in 2026πŸ‘‡ 1/ Kaggle Learn: https://www.kaggle.com/learn 2/ Anthropic Lea…
  5. Aug 7, 2026Roadmap to become a data analyst 1. Foundation Skills: β€’Strengthen Mathematics: Focus on s…
  6. Jul 31, 2026🐍 Python Roadmap 1️⃣ Basics: πŸ“πŸ“œ Syntax, Variables, Data Types 2️⃣ Control Flow: πŸ”„πŸ€– If…
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 β†’