Skip to content

Conversation

@Hipska
Copy link
Contributor

@Hipska Hipska commented Jan 7, 2015

See #3

@ghoneycutt
Copy link
Owner

Looks great! Could you please squash these commits into one commit and I will merge.

@Hipska
Copy link
Contributor Author

Hipska commented Jan 7, 2015

Any reason why this should be done? I would rather not alter my history..

@ghoneycutt
Copy link
Owner

This is common practice when sending a pull request so that when you read through the history of the project you see logical commits instead of "typo", "typo", "fixing newlines", etc.

Rebasing your master branch is not a good idea, because if people base their work on that and the history changes, then merging will break. For topic brances like this, it is a normal activity done before merging.

To do so, checkout out your branch and run git log. Notice the commit sha before your first commit. Then run git rebase -i <SHA>. Leave your first commit alone and all commits after that, change them to 's' for squash. Once you save that you can rewrite the commit message for all of them. Don't worry about my commit in there, squash it as your own.

@ghoneycutt
Copy link
Owner

Check out the commit log for facter - https://github.com/puppetlabs/facter/commits/master

It is not that those people don't screw up any, they just rebase the code before merging :)

@Hipska
Copy link
Contributor Author

Hipska commented Aug 4, 2022

Well, now you can do squash merge commits with Github 😉

@Hipska
Copy link
Contributor Author

Hipska commented Apr 21, 2023

@ghoneycutt ?

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

Successfully merging this pull request may close these issues.

2 participants