Prevent a specific file from getting merged into another branch from the github UI

Hi,
We are trying to maintain the different versions across the different branches of the same repository.
Want to have different versions of init.py file at different branches.
For Eg: If I have two branches dev and master
If I modify the file at both dev and master with different modifications, then send a PR from dev to master, it shows the merge conflicts, not able to ignore this file while merging.
This can be achieved using the commands. Can we achieve this from the Github UI, when we have created a pull request and trying to merge.
And also it would be helpful if you could suggest how versioning is done for frappe or erpnext.

Anything that we missed out or can be tried to achieve this?

Regards