I am developing some code in a dev/feature brach. My commit history has been messy (merges from main, files that didn’t need to commit, lines that I didn’t need to modify).
Now I want to do a PR with my code and I want to create a new clean branch called pr/feature from where to do a PR. I want this branch to contain all the modifications that are needed for the feature in one commit so that it’s easily pullable by reviewers.
Is there a way in git to do this? Should have I used rebase instead of merge?
I feel like I’m missing some git fundamentals here