Skip to main content

Harshal V. LADHE

Bash Scripting

Writing robust Bash scripts — strict mode, argument parsing, safe prompts, and small command-line tools for everyday workflows.

Content tagged bash

  • Snippet:git fix-dates: Fix GitHub Commit Dates After a Rebase

    Reset committer dates to author dates, then safely force-push.
    A git fix-dates command that resets committer dates to author dates after a rebase or amend, keeps merges intact, and force-pushes safely.
    Published at:
    Categories:Git
    Estimated reading time:6 min read
  • Snippet:git prune-branches: Delete Merged and Squash-Merged Branches

    Delete merged, squash-merged and rebased local Git branches safely.
    A git prune-branches command that deletes local branches merged into main — including GitHub squash merges git branch --merged misses — with a restore command for each.
    Published at:
    Categories:Git
    Estimated reading time:5 min read
  • Snippet:git sync: Update Your Branch from main in One Command

    Fetch, fast-forward main, and rebase your branch onto it.
    A `git sync` command that fetches, fast-forwards `main` without a checkout, and rebases or merges your branch onto it — with autostash and undo.
    Published at:
    Categories:Git
    Estimated reading time:4 min read