programming (sorry)
I can't see the original question, so I might be missing some piece of context.
Pushing and pulling works with ssh remotes, as well as local path remotes.
programming (sorry)
You can push into a local or remote-over-ssh-repo.
If you have a checked out branch and are trying to push into that branch, the push will fail: you just need to check out something else (or even the same thing, just in detached HEAD mode). See the full error message at https://paste.sr.ht/~robryk/67de3b229005455bbd0abfd11d7ac20dc2ee3805 that explains alternatives. Note that this would happen regardless of how you access the repo: it's simply that git refuses (by default) to push to a branch that's checked out.
programming (sorry)
@robryk yeah ok, that's the missing context from the deleted toot then. The question was if you could work on two computers on the same codebase without pushing to remote. In that case the same branch would be checked out at both sides. So we're both right. It can work if the branch is not checked out, but in this special case it will not work because the same branch is kinda the point of the exercise :)
programming (sorry)
But also you don't want to share the branch, but share the contents of the working directory. I.e. even if it worked, it wouldn't be doing the intended thing.
programming (sorry)
@robryk yes locally committed changes would be needed. Sharing staging or uncommitted changes will not work. As alison is using vscode remote sharing now she will effectively be working on just one repo, so that's perfect for that case :)
programming (sorry)
@robryk
I am taking alison out as she has found another solution (VScode remote sharing). Are you sure you can push into a working copy via ssh? A bare clone would work for sure but a checked out working copy i am not so sure. (But i have not tested it either)