The One Git Command I Use Every Single Day (And It’s Not git push)

I see junior developers pushing code to main directly. I did the same thing for way too long.

Now I use one command more than any other:
git rebase --interactive HEAD~3

Before I push any branch, I rebase my last 3 commits and squash the “fix typo” and “wip” commits into one clean commit.

This changes how I work:

  • My commit history is readable (not a mess of “oops” messages)
  • My PRs are smaller and easier to review
  • I think more carefully before I commit

It’s not a flashy skill. But it’s the one that made me look more professional than any framework I learned.

What’s one Git command or workflow that made you feel like you actually knew what you were doing?

My full stack (and my clean commit history): My Portfolio