I was wondering if there is any way that GitHub can help users work together on a code file in the same way one would on Google Docs or something.
Git is all about decentralized work: Everyone makes their own commits, and you can merge easily. At least if you don’t have any conflicting edits, otherwise you still need to figure out how to resolve them. So Git itself doesn’t have any shared state.
That said, you might be able to do some sort of collaborative editing with Codespaces, but I haven’t tried it in practice:
I recall Codespaces. I forgot if I had tried it myself, but definitely an option to consider!
I will say to clarify that what I am talking about is direct more towards pair-programming.