If your goal is indeed to keep one version or the other, then yes, you will want to use:
git checkout <--theirs|--ours> <path>
git add <path>
Of course, as you say, it’s not ideal. If there’s any way you can avoid this, you should. If you can, try to adopt workflow habits which avoid changing those files on divergent branches which will later need to be merged. If the files are generated from tracked content, you really probably do want to ignore them – if you have good reason not to, you might want to generate them from the mergeable tracked content instead, if that’s possible.
So, explore all your other options before doing this, but if you must, you’ve got it right.