How should I integrate git into my WordPress workflow when I’m working on remote hosts

Does my proposed workflow work?

That’s up to you but it seems overly complex to me. I would do all the work locally in my own desktop using some kind of tool like wp-env or raw docker and just think about servers when it is time to approve the final work and to deploy on production.

For example if I have multiple staging environments on a host, will it be ok to have multiple clones of my github trunk on the server?

On the git terminology, we don’t say trunk, we say main branch. And you can clone any of the branches of your repository wherever you want to. Yes, you can have 10 different directories with clones of the same repository if you want to.

If this workflow does work, how would I refresh an environment from the trunk?

With git pull or git fetch.

Would it be better to create a new branch and clone it to the environment again, or merge the trunk into the existing branch then pull it to the repo on the host?

I don’t really understand your question but I think that you are probably missing some important knowledge about how a development environment use to work and also how to properly use git.
I suggest you to do the basics first. I advise you to follow this git tutorial and to take a look at the github flow.

Do some research on development workflow. There are many different proposals and people like to blog about it.It may help you. There are lots of different WordPress development workflow out there. For plugin development i personally like to work with wp-env but there are many others like the old LocalWP. There are many other tools for this besides those two.

If you plan to work directly on a server. You really should learn to properly use git at least.

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino