The most underrated Git skill: building your own tooling. A script I run every morning before standup: #!/bin/bash git log \ --since="yesterday" \ --author="$(git config user.name)" \ --format="%C(yellow)%h%Creset %s %C(dim)(%ar)%Creset" \ --no-merges As an alias: git config --global alias.standup \ "!git log --since=yesterday --author=$(git config user.name) --oneline --no-merges" And a quick repository health check: #!/bin/bash echo "=== Commits (last 30 days) ===" git log --since="30 days ago" --oneline | wc -l echo "=== Top contributors ===" git log --since="30 days ago" --format="%an" | sort | uniq -c | sort -rn | head -5 echo "=== Most changed files ===" git log --since="30 days ago" --name-only --format="" | sort | uniq -c | sort -rn | head -5 echo "=== Latest tag ===" git describe --tags --abbrev=0 2>/dev/null || echo "(no tags)" Save as ~/bin/git-health. Run monthly. The principle: Every time you type the same Git sequence more than three times in a week, turn it into a script or alias. 📚 Chapter 28 of Stop Breaking Git. What repetitive Git task should you automate right now? Name it in the comments. #Git #DeveloperProductivity #ShellScripting #SoftwareEngineering #Automation
Automate Repetitive Git Tasks with Custom Tooling
More Relevant Posts
-
Essential Git Commands Every Developer Should Know (Practical Guide) Git is not just about add, commit, and push. Knowing the right commands helps you manage code, collaborate safely, and recover quickly from mistakes. ⸻ 📁 Repository Setup git init – Initialize a new repository git clone <repo_url> – Clone existing repository ⸻ 📌 Tracking Changes git status – Check current changes git add <file> / git add . – Stage changes ⸻ 💾 Committing git commit -m "message" – Save changes git commit --amend – Modify last commit ⸻ 🌿 Branching git branch – List branches git checkout -b <branch> – Create & switch git switch <branch> – Switch branch ⸻ 🔀 Merge / Rebase git merge <branch> – Merge branches git rebase <branch> – Clean commit history ⸻ 🚀 Remote git pull – Get latest changes git fetch – Fetch without merging git push origin <branch> – Push code ⸻ ⏪ Undo git restore <file> – Discard changes git reset <file> – Unstage git revert <commit> – Safe undo (recommended) ⸻ 🔍 History git log --oneline – View commits git diff – Check differences ⸻ 📦 Stash git stash – Save work temporarily git stash pop – Restore work ⸻ 🧩 Practical Scenario (Hotfix) git stash → git checkout main → git pull → git checkout -b hotfix/issue → fix → commit → git push ⸻ Key Takeaways • Prefer fetch before pull • Use revert instead of reset in shared branches • Keep commits small and meaningful • Always verify using status before pushing ⸻ Mastering Git is about using the right command at the right time. #Git #VersionControl #SoftwareEngineering #Developers #DevOps
To view or add a comment, sign in
-
Git Cheat Sheet Every Developer Should Save If you keep forgetting Git commands… you’re not alone. Git is powerful, but only if you understand the right commands at the right time. Here’s a structured cheat sheet you’ll actually use 👇 1. Setup & Configuration git config --global user.name → Set your name git config --global user.email → Set your email git config --global color.ui auto → Better CLI visibility 2. Initialize & Clone git init → Start a new repository git clone [url] → Copy an existing repo 3. Stage & Commit (Most Used) git status → Check changes git add [file] → Stage file git commit -m "message" → Save snapshot git diff → See unstaged changes git diff --staged → See staged changes 4. Branching & Merging git branch → List branches git branch [name] → Create branch git checkout [branch] → Switch branch git merge [branch] → Merge changes 5. Remote Operations git remote add [alias] [url] → Connect repo git push → Upload code git pull → Fetch + merge updates git fetch → Get updates without merging 6. Tracking Changes git log → View history git show [SHA] → View specific commit git diff branchA...branchB → Compare branches 7. Temporary Work (Stash) git stash → Save changes temporarily git stash pop → Restore changes git stash list → View saved states 8. Undo & Rewrite git reset --hard [commit] → Reset project git rebase [branch] → Reapply commits Git is not about memorizing commands. It’s about understanding when and why to use them. If you master these… you’ll handle 90% of real-world Git tasks confidently. Comment “GIT” if you want the full PDF cheat sheet. If this feels like your journey, you’re not alone. If you want to grow on LinkedIn, follow ❤️me Narendra Kushwaha. and DM me. I’ll guide you on the right path for 2026, based on my journey of building a 7K+ LinkedIn family in 7–8 months. #Git #VersionControl #Developers #Programming #SoftwareEngineering #Tech #CareerGrowth
To view or add a comment, sign in
-
Demystifying Git: The 4 Core Layers of Git. Most developers treat Git like a magic undo button, but understanding its actual internal architecture completely changes how you use it.These are the 4 core layers of git. • Persistence: Git is a key-value store. Every file (blob), directory (tree), Annotated Tag and commit is saved as an immutable object in .git/objects identified by a unique SHA-1 hash. • Content Tracker: Git tracks complete snapshots of your content, not file differences. These snapshots are maintained by a Tree object, which is dynamically generated from the index file (staging area) at the moment of commit. • Version Control: Git connects your snapshots into a timeline structured as a Directed Acyclic Graph (DAG). The Commit object acts as a node in this graph, storing metadata to link a specific snapshot to its parent history. • Distributed Version Control: Git is peer-to-peer. Every local clone is a fully autonomous backup of the entire project, and network operations (push/fetch) merely sync missing objects and update pointers. Branches, Head and tags aren't duplicated folders; they are like simply lightweight pointers to a commit within the DAG, making branching an instantaneous pointer swap. These insights are heavily inspired by the teachings of Mohit Dharmadhikari at VoidInfinity Tech. #Git #SoftwareEngineering #SystemArchitecture #DistributedVersionControl
To view or add a comment, sign in
-
-
If you don’t know these Git & GitHub commands, you’re making development harder than it needs to be. → git init — start a repository → git add . — stage all changes → git commit -m "msg" — save changes → git status — check file state → git log --oneline — view history → git branch — list branches → git checkout -b <branch> — create + switch → git merge <branch> — merge changes → git remote add origin <url> — connect repo → git push origin — upload code → git pull origin — get updates → git clone <url> — copy repo → git revert HEAD — undo safely → git reset <id> — go back → git commit --amend — fix last commit ─────────────────── These are not “extra” commands. This is your daily workflow. And yes — this is exactly what gets asked in interviews. This PDF explains everything clearly: • How Git tracks changes • Staging → Commit → History • Branching & merging • Working with GitHub • Undoing mistakes properly Now the part that actually helps: • Don’t memorize — use Git daily • Understand reset vs revert (very important) • Write meaningful commit messages • Practice branching on small projects • Learn by breaking things & fixing them One simple test: If you can explain your Git workflow step-by-step… you’re already ahead of most candidates. Use this like a quick revision: Open → scan → recall → apply That’s all it takes. Save this — this is your 10-minute Git revision before interviews. Follow Sahil Hans for more practical dev, DSA & interview prep content 🤝
To view or add a comment, sign in
-
If you think GIT is hard Here’s a practical list of Git commands you should already be comfortable using: ───────────────────── → git init — Initialize a repo → git clone — Copy a repo locally → git status — Check changes → git add — Stage files → git add . — Stage all changes → git commit -m "msg" — Save changes → git commit --amend — Edit last commit → git log — View history → git log --oneline — Compact history → git show <id> — Commit details → git branch — List/create branches → git checkout -b <branch> — Create + switch → git switch <branch> — Switch branch → git merge <branch> — Merge changes → git rebase <branch> — Reapply commits → git remote -v — View remotes → git push — Upload changes → git pull — Get updates → git fetch — Fetch without merge → git reset --hard — Reset everything → git revert <id> — Safe undo → git restore <file> — Discard changes → git diff — See changes → git blame <file> — Track edits → git stash — Save work → git stash pop — Restore work → git config --global user.name "Name" → git config --global user.email "email" → git help <command>
To view or add a comment, sign in
-
-
Essential Git Commands Every Developer Should Know Whether you’re collaborating on enterprise projects or managing personal repositories, mastering Git is non‑negotiable. Here are some of the most commonly used commands that keep workflows smooth: 🔑 Core Commands git init → Initialize a new repository git clone → Copy an existing repository git status → Check changes in your working directory git add → Stage changes for commit git commit -m "message" → Save changes with a message git push → Upload local commits to remote repo git pull → Fetch and merge changes from remote 🛠️ Helpful Commands git branch → List, create, or delete branches git checkout → Switch between branches git merge → Merge a branch into the current one git log → View commit history git diff → Show changes between commits 💡 Pro Tip: Always write clear commit messages — they’re your project’s timeline and storytelling tool. 👉 What’s your go‑to Git command that you can’t live without? Would you like me to make this post more visually engaging (e.g., with emojis, formatting tricks, or a short infographic‑style snippet), or keep it strictly professional and minimal for LinkedIn? #Git #techincal #code #AI #visualcode
To view or add a comment, sign in
-
-
Git is not just for developers, even in cybersecurity, it becomes really useful. I’ve been using it while working on small testing setups and projects to track changes and manage files. These basic commands cover most of what’s needed in practice. Simple but important 👍 thank you for this post btw..
Essential Git Commands Every Developer Should Know Whether you’re collaborating on enterprise projects or managing personal repositories, mastering Git is non‑negotiable. Here are some of the most commonly used commands that keep workflows smooth: 🔑 Core Commands git init → Initialize a new repository git clone → Copy an existing repository git status → Check changes in your working directory git add → Stage changes for commit git commit -m "message" → Save changes with a message git push → Upload local commits to remote repo git pull → Fetch and merge changes from remote 🛠️ Helpful Commands git branch → List, create, or delete branches git checkout → Switch between branches git merge → Merge a branch into the current one git log → View commit history git diff → Show changes between commits 💡 Pro Tip: Always write clear commit messages — they’re your project’s timeline and storytelling tool. 👉 What’s your go‑to Git command that you can’t live without? Would you like me to make this post more visually engaging (e.g., with emojis, formatting tricks, or a short infographic‑style snippet), or keep it strictly professional and minimal for LinkedIn? #Git #techincal #code #AI #visualcode
To view or add a comment, sign in
-
-
If you don’t know these Git & GitHub commands, you’re making development harder than it needs to be. → git init — start a repository → git add . — stage all changes → git commit -m "msg" — save changes → git status — check file state → git log --oneline — view history → git branch — list branches → git checkout -b <branch> — create + switch → git merge <branch> — merge changes → git remote add origin <url> — connect repo → git push origin — upload code → git pull origin — get updates → git clone <url> — copy repo → git revert HEAD — undo safely → git reset <id> — go back → git commit --amend — fix last commit ─────────────────── These are not “extra” commands. This is your daily workflow. And yes — this is exactly what gets asked in interviews. This PDF explains everything clearly: • How Git tracks changes • Staging → Commit → History • Branching & merging • Working with GitHub • Undoing mistakes properly Now the part that actually helps: • Don’t memorize — use Git daily • Understand reset vs revert (very important) • Write meaningful commit messages • Practice branching on small projects • Learn by breaking things & fixing them One simple test: If you can explain your Git workflow step-by-step… you’re already ahead of most candidates. Use this like a quick revision: Open → scan → recall → apply That’s all it takes. Save this — this is your 10-minute Git revision before interviews.
To view or add a comment, sign in
-
Git worktrees have been in Git since 2015. I only really started using them this year. AI is why. One repo, multiple directories, each checked out to its own branch. Two or three branches open in parallel, all sharing the same .git. No stashing, no context-switching friction. What made it click: running multiple Claude Code sessions in parallel. If they share a working directory, they fight over the files. Give each session its own worktree and they don't. One session works a PRD milestone. Another investigates a regression. A third explores a risky refactor. Switching between them is just switching terminal tabs. And the throwaway angle is huge. AI can refactor aggressively: ten commits, half your files renamed, three new abstractions you didn't ask for, all in 30 minutes. If that lands on main, untangling is painful. If it's in a worktree, you git worktree remove and it's gone. Wrote about two layouts, my aliases, and how I actually use them with AI day to day: https://lnkd.in/dTGzTFT4
To view or add a comment, sign in
-
More from this author
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development