Skip to content

Instantly share code, notes, and snippets.

@bestickley
Created April 16, 2025 13:12
Show Gist options
  • Select an option

  • Save bestickley/d093477f3d40c1db57a77a3fa2e47ef3 to your computer and use it in GitHub Desktop.

Select an option

Save bestickley/d093477f3d40c1db57a77a3fa2e47ef3 to your computer and use it in GitHub Desktop.
Git Squash Feature Branch To One Commit
git switch feat-my-feature
git reset --soft $(git merge-base main HEAD)
git commit -m "feat: my feature"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment