Checkout master with previous commit

Check out the commit that you want to reset to

git checkout 307a5cd

Create a branch named tempBranch to do the work

git checkout -b tempBranch

Merge master’s history without changing any files

git merge -s ours master

Switch back to master

git checkout master

Merge in the fixed branch

git merge tempBranch

Done, no need to force push!

git push