send-pull-request-as-one-commit
u create a new feature branch from master
git checkout master
git checkout -b newfeature
you work on this branch for days which involves several merge commits from master to keep your self updated
but now is the time to submit a pull/merge request and you have a very dirty history
git checkout newfeature
git checkout -b newfeature-for-merge
git merge-base newfeature-for-merge master
-- you get a hash
git reset --soft <hash>
git status
you will get all the files as newly added
git commit -m "New feature with great features"
you have a single commit now for master