Some conflicts aren’t worth resolving line by line. For a generated file or a lock file, I just want one side complete and then regenerate.
git checkout --theirs package-lock.json
git add package-lock.json
During a merge, --ours is the version on your current branch and --theirs is the version from the branch you’re merging in. The command replaces the conflicted file in your working tree with that version. Then git add marks it as resolved. git restore --theirs does the same if you prefer the newer command.
For a lock file, I’d follow up by running the package manager once more, so the result matches both sides’ dependencies.
If you change your mind, git checkout -m package-lock.json brings back the file with conflict markers so you can start over.
The big trap is a rebase. There, the meaning flips: git replays your commits on top of the other branch, so --ours is the branch you’re rebasing onto and --theirs is your own work. Look at the result with git diff --cached before continuing, instead of trusting the word. And remember this takes the whole file. Any change from the other side in that file is gone, not only the conflicting lines.
Further reading: git-checkout documentation, git-restore documentation