While merging Pull-Requests (PR) on GitHub, there is one option "Squash And Merge", What is purpose of that and what it will do ??
This blog post from Github may help.
The basic idea is that all the commits you added on your feature branch, will be put together into one, large commit, making the git tree easier to read. This is particularly useful if you frequently reverted mistakes in your branch.

Sometimes while working on a task you create a lot of minor commits, that you may not want to be on your master branch. So that you can squash them before a merge and leave only one, fully descriptive commit.
Also, there may be some conventions in the developer team to have a more concise, shorter git history in the repo. Like for example one commit per one feature (even though there was a couple on the feature branch). Then it's easier to go through recent commits and so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With