-
Notifications
You must be signed in to change notification settings - Fork 458
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
Rebase or merge for updating branches? #3661
Comments
I think, that we do not have a policy for it. I am a bit in favor for "merge". It is the same, when merging a PR: Most of us merge it, few (if any?) rebase it, and a few squash and merge*. *Squashing is what I dislike most, because it puts all changes from commits before and creates a new commit with these changes, so you can end in a situation, where your parent commit does not exist anymore, when branching from one of this intermediate commits before squashing -.- On the other hand, I see,why peaople use it, to reduce the historie... |
I think it's not so much about squashing or not, but about the quality of the commits. IMO every change that is made to the code base should be somehow self-contained and not cut in a hundred pieces that partly replace each other, because somebody was just testing out things. One can think of squashing as somebody wanting to add a feature and then simply committing the final version, not every single development step. Beyond that, and ideally, one could enforce to use conventional commits for the PR names and then use something like release-please that generates an automatic change log :) PS: Sorry, I hit the close button ;) |
When I see the curved paths that I take until I have implemented something more or less correctly, I think it makes a lot of sense to not include this into the main history. If this means squash or merge I do not know. |
@kainagel That would be "squash": It puts all your changes from all commits together as one new commit and throws away the old ones. For larger changes, maybe create locally another branch, cherry-pick your commits from the first develop-branch and then interactively rebase them, which allows also combining commits...Now you have a branch with a clear and straightforward commit history to merge into master/main... |
I have noticed that some people are merging the main branch into a feature branch and some rebase the feature branch onto the main branch. When you update a branch on github, it merges.
Do we have a policy for this? Merging creates a merge commit.
The text was updated successfully, but these errors were encountered: