In our company we work with branches within the feature for new features and hotfix for bug fixes (gitflow).
It turns out that a few days ago an developer forgot to create a branch on a feature and committed locally to master, but didn't push it to Bitbucket Cloud. And to make matters worse, there were new commits on the master branch at the source, which the developer had not yet pulled.
Luckily for us, he made few changes. In these cases what should be done in these situations, to push his code to the correct branch (eg.: feature/new-super-feature) without losing any changes. ?