Can 2 programers code on different OS on the same project?

let’s say that i am coding in windows and a friend is coding at linux both to the same project.

is this possible?

this question can be to other projects outside of unity but can we edit the same script in other platform and get it to work?

Yes.