Bob and Alice got the ssh access to a RemoteMachine, they work together with ProjectA. Assume Alice has a repos in her home directory
RemoteMachine/home/alice/ProjectA
while Bob will firstly clone Alice's repos to (with --bare is better maybe)
RemoteMachine/home/bob/ProjectA
Bob will not edit ProjectA directly in the RemoteMachine. So maybe he want to clone from his remote Repos RemoteMachine/home/bob/ProjectA
to LocalMachine(Why not bob directly clone from Alice? Maybe Alice want to pull directly from RemoteMachine/home/bob/ProjectA
).
git clone bob@RemoteMachine:/home/bob/ProjectA LocalMachine/home/bob/PrjA
My question is:
What is the best practise to achieve this(see below)?
I can edit locally and push to RemoteMachine/home/bob maybe with:
Local/bob/repos> git push
I can run the reset command in my LocalMachine still can reflect to
RemoteMachine/home/bob
that Alice can pull fromLocal/bob/repos> reset --hard HEAD^
I can fetch what Alice changes in my LocalMachine.
I don't know the if these needs are reasonable, so if you find it's not, just propose yours and explain why. It'll be appreciate if you can show the workflows with git command in that situation.