cmneal26 / Tech-Writing-Project

Class repository
2 stars 1 forks source link

Hey, I Just Wanted To Know If I Should Choose The "Squash" Option When I Merge My Pull Request? #11

Closed ghost closed 2 years ago

ghost commented 2 years ago

On GitHub, once you open a pull request, if you have the correct permissions, you can "Squash Before Merging". Gonna leave this one up to Tim whether this is something worth learning now.

twalker commented 2 years ago

The merge options are typically a team decision alongside what makes the most sense for automated delivery. There are a couple camps of thought: rebase users like a linear commit history, and merge users who prefer less risk of conflict.

It doesn't really matter tor our work, we'll be able to "undo" any breaking changes using revert or reset. Personally, I prefer to make a bunch of atomic commits in a pull request (aka PR), and set the repositories settings to only make the squash merge option available in PRs. GitHub will automatically collapse all my commit's into a single merge commit.

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github