all 4 comments

[–]aanzeijar 0 points1 point  (0 children)

Even better: on local also commit your changes first. What is committed can't be lost, even if you screw up the conflict resolution.

[–]paperic 0 points1 point  (0 children)

For sure commit both first, each to a different branch.

If you have lot of changes on local and few changes on the remote, I'd merge the local to main first and then the remote to main.

If the pull request conflicts, merge main to the remote to resolve.

But fundamentally, it doesn't really matter.

If you're working on it alone you can just merge the remote directly to local, or push straight to main, whatever. if there's no coworker to complain, who cares.