You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warn before merging a PR if it contains fixup or squash commits #2385
Our team uses fixup! and squash! commits to add changes to pull requests that have already been reviewed.
This is helpful for the reviewers because they can quickly identify the changes since their last review.
The commit history can look like this:
Commit A
Commit B
Commit C
fixup! Commit B
squash! Commit A
Note: Fixup and squash commits can be created with git commit (--fixup|--squash) <ref>, as shown in this crappy GIF.
When the pull request is ready to be merged, these commits are squashed/fixed up with git rebase -i --autosquash.
These commits are temporary and shouldn't be merged. I think it would be helpful to show a warning next to (and maybe disable) the "Merge" button when the current pull request contains at least one fixup/squash commit.
Reacted by Bastien PELLETIER GARNIER, Sindre Sorhus, Paul Love, Robert Cooper, Glenn 'devalias' Grant, Flo Edelmann, Wasif Riaz Malik, Etienne Beylier, Terence Tuhinanshu and Frederick Zhang
Activity
dorian-marchal commentedon Aug 27, 2019
Here is a pull request with fixup commits: dorian-marchal#1
Here is one with squash commits: dorian-marchal#2
And here is one with both a squash and a fixup commit: dorian-marchal#3
fregante commentedon Sep 17, 2021
Tracked in #2579