This is the safest solution:
git stash
Now you can do whatever you want without fear of conflicts.
For instance:
git checkout origin/master # or origin/main
If you want to include the remote changes in the master branch you can do:
git reset --hard origin/master # or origin/main
This will make you branch “master” to point to “origin/master”.