I wanted to any git command for accepting both changes.(ours and theirs). Then, I am curious about how the vscode is doing that. Can anyone help me?
You can check exactly what commands are run in the "Git" console, under the "Output" tab:
In this case, VSCode doesn't run any Git commands to accept both changes: it just removes the conflict markers by itself.