Skip to content

Instantly share code, notes, and snippets.

View kwojcicki's full-sized avatar
🥞
Mango Waffling

Krystian kwojcicki

🥞
Mango Waffling
View GitHub Profile
@longtimeago
longtimeago / squash-commits.md
Last active April 1, 2024 20:44
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch: