Skip to main content

Harshal V. LADHE

Safe Force-Pushing with --force-with-lease

Force-pushing rewritten history without overwriting a teammate's work, using `--force-with-lease` and `--force-if-includes`.

Content tagged force-with-lease

  • 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 Aliases Worth Adding to Your ~/.gitconfig

    Tested Git aliases for history, undo, fixups, and search.
    Tested Git aliases for your `~/.gitconfig`: compact logs, safe undo, one-step fixups, WIP parking, and safe force-pushes.
    Published at:
    Categories:Git
    Estimated reading time:4 min read