I have a website : exemple.com
, and a clone of this website : exemple.xyz
.
I want to know how to easily work on my clone and "push" my working code on my website.
I have a website : exemple.com
, and a clone of this website : exemple.xyz
.
I want to know how to easily work on my clone and "push" my working code on my website.
It really depends on your example.com
server environment.
If you have access to that server, then you can add a bare repo, with a post-receive hook which would, after receiving a git push
, restore files in your actual website folder. I describe that in "How to Git Push to a Server Machine without having to ssh on to that machine every time?".
That means you can push both to your fork and that destination server bare repo at the same time, as explained here:
git remote set-url --add --push origin /url1/fork.git
git remote set-url --add --push origin /url2/bare/repo.git
But if you don't, then it is best to use a third-party website manager like Netlify to link your repository to said managed website: then a simple push would be enough to trigger a publication update.