How to Combine Multiple Git Commits into One
An interactive rebase mode allows you to combine your commits into even a single commit. While working in Git, developers often make temporary commits that may have not appropriate commit messages. Before merging those commits to the master, it is necessary to combine them into a single commit with clear and comprehensive commit message.
https://www.w3docs.com/snippets/git/how-to-combine-multiple-commits-into-one-with-3-steps.html