Huzi Blogs
BlogCategories
BlogCategories
Disclaimer & Data Privacy Policy
Project by huzi.pk

© 2026 blogs.huzi.pk. All Rights Reserved.

    Back to all posts
    DevOps

    Mastering Git and GitHub in 2026: A Developer's Essential Toolkit

    By Huzi

    You know commit, push, and how to apologize in a pull request. Mastery is the next layer: keeping history linear before anyone reviews it, recovering from the mistakes that feel fatal, and leaving reviews that make code better instead of longer. None of it is hard. All of it is habit.

    Rebase before you ask for review

    Your branch started from Monday's main; it is Thursday now, and main moved. Rebasing replays your commits on top of the fresh tip, so reviewers see your change once, cleanly, instead of a merge-conflict museum:

    git fetch origin
    git rebase origin/main
    

    Conflicts pause the replay; resolve each one, then continue. Two rules keep you safe: rebase is local hygiene — never rewrite a branch other people have already pulled — and if you must force-push, --force-with-lease fails politely instead of overwriting someone's new commits.

    The reflog: almost nothing is truly lost

    The day will come when a botched rebase or a panicky git reset --hard makes your work "disappear". Breathe. Git remembers every place HEAD has pointed:

    git reflog
    # a1b2c3d HEAD@{7}: rebase (abort) ...
    # e4f5a6b HEAD@{8}: commit: feat: payment retries
    git reset --hard HEAD@{8}
    

    Find the moment before the disaster, reset to it or branch from it, and your work is back. Deleted branches, amended commits, most "I lost everything" moments — the reflog has been keeping receipts the whole time.

    Reviews worth reading

    Three habits upgrade a team's review culture fast. Review your own PR first, top to bottom — you will catch the leftover debug lines and save reviewers for real questions. Comment on the why, never the what: "uses a five-minute cache because the upstream API rate-limits" is context; "this fetches the user" is noise. And retire the bare LGTM — an approval should name one thing you actually verified, or it is a rubber stamp wearing a signature. When two engineers fundamentally disagree, do not let it fester for a week: one short call, decision documented in the thread, move on.

    Close the loop from the terminal

    gh pr checkout 432
    gh pr merge --squash --delete-branch
    gh run watch
    gh release create v1.42.0 --generate-notes
    

    Check out a colleague's PR locally, merge it squashed with the branch cleaned up, watch CI from the terminal, and cut a release with generated notes. Signed commits — an SSH key, or Sigstore's keyless gitsign — are worth switching on while you are at this level.

    Git's whole design whispers a reassurance: history can be recovered, mistakes can be undone. I wish the world worked that way for everyone — the families of Gaza deserve a reflog of their own, a way back to what was taken. May they get it.

    When something you thought was settled gets refused — a UK or Schengen visa file, say — we do the reflog thing for a living. HTG Travels reworks refused cases from Sialkot, finds what actually sank them, and re-files properly. Not everything lost is lost; it depends who is doing the looking.

    Advertisements


    You Might Also Like

    All-Over Print Embroidered EID Lawn Suit 3-Pc | Heavy Sleeves Patches & Chiffon Dupatta (2025)

    All-Over Print Embroidered EID Lawn Suit 3-Pc | Heavy Sleeves Patches & Chiffon Dupatta (2025)

    PKR 4800

    Mustard Dhanak Dress – Emb Front, Sleeves, Daman & Bottoms, Winter 3-Pc

    Mustard Dhanak Dress – Emb Front, Sleeves, Daman & Bottoms, Winter 3-Pc

    PKR 5350

    90/70 Quality Schiffli Embroidered Lawn Suit 3-Pc | Digital Printed Chiffon Dupatta (2025)

    90/70 Quality Schiffli Embroidered Lawn Suit 3-Pc | Digital Printed Chiffon Dupatta (2025)

    PKR 4900

    Elegant Sequins Embroidered Lawn Suit 3-Pc (2025) | Diamond Organza Dupatta

    Elegant Sequins Embroidered Lawn Suit 3-Pc (2025) | Diamond Organza Dupatta

    PKR 4700

    Elegant Embroidered Lawn 2-Piece Suit | Unstitched Shirt & Plain Trouser for Pakistani Ladies

    Elegant Embroidered Lawn 2-Piece Suit | Unstitched Shirt & Plain Trouser for Pakistani Ladies

    PKR 2900

    Advertisements


    Related Posts

    DevOps
    Terraform IaC Guide 2026: The Complete Problem-Solving Guide
    The init, plan, apply workflow that replaces click-ops, remote state on S3 with locking, modules over copy-paste, and the import rescue for resources someone already clicked into existence.

    By Huzi

    Read More
    DevOps
    Microservices Communication Patterns 2026: The Complete Problem-Solving Guide
    Sync vs async picked per call, sagas with compensating actions, the transactional outbox, circuit breakers and service mesh — one line on what each is and when it earns its place.

    By Huzi

    Read More
    DevOps
    CI/CD Pipeline Design 2026: The Complete Problem-Solving Guide
    Stage gating, building once and promoting the same artifact, rolling vs blue-green vs canary deploys, and the four DORA numbers that tell you if any of it works.

    By Huzi

    Read More
    DevOps
    Observability & Monitoring 2026: The Complete Problem-Solving Guide
    Metrics, logs and traces explained in plain language, OpenTelemetry stitching them together with one trace ID, and what you should actually wake a human for at 3 a.m.

    By Huzi

    Read More
    DevOps
    Kubernetes for Developers 2026: The Complete Problem-Solving Guide
    The daily kubectl toolkit: reading pod states, debugging CrashLoopBackOff, shipping a new image with a one-command rollback, and telling the cluster what ready means.

    By Huzi

    Read More
    DevOps
    Git Workflows for Teams 2026: The Complete Problem-Solving Guide
    Trunk-based vs Git Flow vs plain PR flow, branch protection that actually enforces the rules, and the merge policy that keeps history readable at 2am.

    By Huzi

    Read More