Overwrite 'Main file' with 'Branch'

Is it possible to overwrite a main file by replacing it by a branch? I have made too many changes in both my main and branch, and eventually would like to keep my branch only as my ‘main’ and avoid resolving conflicts one by one…