I am working on project alone (though some other people may use this repo) and for some time, I was making all my commits into master branch (commits are pushed to GitHub).
But at this point, I decided that master branch became too cluttered with small commits and, to make things look prettier, I want to move all my commit history into wip branch, and then only merge with master on new version.
The end result should be a wip branch with contents and commit history identical to the current master branch, and a master branch with a single commit with contents identical to the current wip branch.
What is the safest way to do that?