Dark | Light
[GUEST ACCESS MODE: Data is scrambled or limited to provide examples. Make requests using your API key to unlock full data. Check https://lunarcrush.ai/auth for authentication information.]

![techNmak Avatar](https://lunarcrush.com/gi/w:24/cr:twitter::1818381581897412608.png) Tech with Mak [@techNmak](/creator/twitter/techNmak) on x 10.5K followers
Created: 2025-07-14 09:12:05 UTC

You don’t really learn Git until you break something important.

Essential Git commands -

📌 Configuration & Setup
git config - Configure Git settings (username, email, preferences)
git init - Initialize new Git repository
git clone - Create local copy of remote repository
git help - Display command help information

📌 Core Workflow
git add - Stage changes for next commit
git commit - Record changes permanently in history
git status - Show working directory state
git diff - Display file differences
git rm - Remove files from Git tracking
git mv - Move/rename files with Git tracking

📌 Branch Management
git branch - List, create, or delete branches
git checkout - Switch branches or restore files
git merge - Combine changes from different branches
git rebase - Reapply commits for linear history
git switch - Modern branch switching (Git 2.23+)

📌 Remote Operations
git remote - Manage remote repository connections
git fetch - Download objects without merging
git pull - Fetch and merge remote changes
git push - Upload commits to remote repository
git clone --bare - Create repository without working directory, used for sharing

📌 History & Analysis
git log - Display detailed commit history
git show - Show specific commit details
git blame - Show line-by-line authorship
git shortlog - Summarize commits by author
git describe - Generate human-readable commit names

📌 Advanced History
git reset - Move branch pointer and optionally update staging/working directory
git revert - Create commits that undo previous changes
git cherry-pick - Apply specific commits to current branch
git reflog - Show local reference update history
git bisect - Binary search for bug-introducing commits

📌 Temporary Storage
git stash - Temporarily save uncommitted changes
git stash pop - Apply and remove most recent stash
git stash apply - Apply stash without removing it
git stash list - Display all saved stashes
git stash drop - Delete specific stash

📌 Inspection Tools
git ls-files - List all tracked files
git ls-tree - Display tree contents for commits
git grep - Search patterns in tracked files
git show-ref - List all repository references
git count-objects - Show object count and disk usage

📌 Maintenance
git gc - Run garbage collection for optimization
git prune - Remove unreachable objects
git fsck - Verify repository integrity
git clean - Remove untracked files
git remote prune - Remove stale remote references

📌 Specialized Commands
git archive - Create repository archives
git format-patch - Generate patch files for email
git apply - Apply patch files
git rev-list - List commits with filtering options
git worktree - Manage multiple working directories

Every developer has that one Git mistake that taught them everything. 🙌💪

![](https://pbs.twimg.com/media/Gvzp5XBbAAAAusV.jpg)

XXXXX engagements

![Engagements Line Chart](https://lunarcrush.com/gi/w:600/p:tweet::1944686326420574555/c:line.svg)

**Related Topics**
[init](/topic/init)
[git](/topic/git)
[mak](/topic/mak)

[Post Link](https://x.com/techNmak/status/1944686326420574555)

[GUEST ACCESS MODE: Data is scrambled or limited to provide examples. Make requests using your API key to unlock full data. Check https://lunarcrush.ai/auth for authentication information.]

techNmak Avatar Tech with Mak @techNmak on x 10.5K followers Created: 2025-07-14 09:12:05 UTC

You don’t really learn Git until you break something important.

Essential Git commands -

📌 Configuration & Setup git config - Configure Git settings (username, email, preferences) git init - Initialize new Git repository git clone - Create local copy of remote repository git help - Display command help information

📌 Core Workflow git add - Stage changes for next commit git commit - Record changes permanently in history git status - Show working directory state git diff - Display file differences git rm - Remove files from Git tracking git mv - Move/rename files with Git tracking

📌 Branch Management git branch - List, create, or delete branches git checkout - Switch branches or restore files git merge - Combine changes from different branches git rebase - Reapply commits for linear history git switch - Modern branch switching (Git 2.23+)

📌 Remote Operations git remote - Manage remote repository connections git fetch - Download objects without merging git pull - Fetch and merge remote changes git push - Upload commits to remote repository git clone --bare - Create repository without working directory, used for sharing

📌 History & Analysis git log - Display detailed commit history git show - Show specific commit details git blame - Show line-by-line authorship git shortlog - Summarize commits by author git describe - Generate human-readable commit names

📌 Advanced History git reset - Move branch pointer and optionally update staging/working directory git revert - Create commits that undo previous changes git cherry-pick - Apply specific commits to current branch git reflog - Show local reference update history git bisect - Binary search for bug-introducing commits

📌 Temporary Storage git stash - Temporarily save uncommitted changes git stash pop - Apply and remove most recent stash git stash apply - Apply stash without removing it git stash list - Display all saved stashes git stash drop - Delete specific stash

📌 Inspection Tools git ls-files - List all tracked files git ls-tree - Display tree contents for commits git grep - Search patterns in tracked files git show-ref - List all repository references git count-objects - Show object count and disk usage

📌 Maintenance git gc - Run garbage collection for optimization git prune - Remove unreachable objects git fsck - Verify repository integrity git clean - Remove untracked files git remote prune - Remove stale remote references

📌 Specialized Commands git archive - Create repository archives git format-patch - Generate patch files for email git apply - Apply patch files git rev-list - List commits with filtering options git worktree - Manage multiple working directories

Every developer has that one Git mistake that taught them everything. 🙌💪

XXXXX engagements

Engagements Line Chart

Related Topics init git mak

Post Link

post/tweet::1944686326420574555
/post/tweet::1944686326420574555