Skip to content

Sqash commits #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Y-Less opened this issue Sep 24, 2019 · 6 comments
Closed

Sqash commits #450

Y-Less opened this issue Sep 24, 2019 · 6 comments

Comments

@Y-Less
Copy link
Member

Y-Less commented Sep 24, 2019

This is just a note, as there isn't really a good way to discuss things on Github. People seem to talk about how squash commits are a good way to merge requests. The feature branch keeps all the individual commits, while the main branch gets a single commit with a complete feature and a clean history. Github has even added a "squash" option to their web-based pull request merge. I tried this for the first time on three PRs yesterday: #441 #447 and #372.

I won't be doing that again. There seems to be absolutely no mention of the original authors (@Daniel-Cortez and @YashasSamaga) in the commits, nor any links (except in the text of the commit message) to the original commits. As a result it just looks like I commited a load of stuff and closed some pull requests, whereas what actually happened was I tried to merge. All those git usage guides that advocate squash? Ignore them!

Sorry @Daniel-Cortez and @YashasSamaga.

@Y-Less Y-Less closed this as completed Sep 24, 2019
@Y-Less
Copy link
Member Author

Y-Less commented Sep 24, 2019

I did re-merge them, but I don't know if that is a bit silly as well, to end up with several merge commits making no changes.

@Daniel-Cortez
Copy link
Contributor

@Y-Less I think it would be valid to add a "(merged)" prefix to the titles of those PRs, so the others could easily see that those PRs were actually merged and not rejected (could be useful for a job interview, for example).

And if you're going to do this, can you please also add that prefix to #353? It seems it was "merged" in the same manner. Thank you in advance.

@Southclaws
Copy link
Collaborator

Why not simply merge using the GitHub UI?

@Y-Less
Copy link
Member Author

Y-Less commented Sep 24, 2019

Because I wanted to build and test them all together first.

@Southclaws
Copy link
Collaborator

Then you can merge locally and test, then perform the final merge on GitHub.

Or alternatively, if others wish to test after you merge, you can merge to another temporary branch to stage all the changes together, then merge the original into the dev branch via GitHub and delete the staging branch.

@Y-Less
Copy link
Member Author

Y-Less commented Sep 24, 2019

Yeah, probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants