Keeping your history clean

Selenium is a large project with lots of contributors. Due to this, there are lots of commits happening all the time. To keep the commit history clean, the developers try to ensure that each pull request that they merge into the main branch is just a single commit. We didn't have a problem with our change, because it was very simple. However, if you have made some quite far-reaching changes and have many commits, you will probably find out that you have some tidying up to do.

First of all, don't worry. It's not a big problem. GIT has the ability to squash these multiple commits into one change. Let's have a look at how we can do this. We will start off with a project that has four commits that we want to squash ...

Get Mastering Selenium WebDriver 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.