Development of a new theme using remote git

davidarnoult Member
edited February 2019 in Themes

Hi!

I would like to create a new theme forked from zpBootstrap @vincent3569 and why not share it.

I would like to setup a git architecture in order to pull latest zenphoto and zpBootstrap repos, modify the forked version locally then push on my remote git server connected to a dev host, then push it to a prod branch on same server.

But I do not know how to integrate all of that. I use IDE PhpStorm 2019. Can you help me? What is the best way to implement these mechanisms? I know svn but git is definitely the best now.

Thank you for your help.

David

Tags:

Comments

  • acrylian Administrator, Developer

    We appreciate new themes especially from third parties!

    We're using Git via GitHub and pretty straightforward.

    Generally if you create a repo or a fork repo from another you do check out it locally normally anyway and push back your changes to that remote repository. Isn't that basically what you like to do? GitHub has good documentation of all these things.

    We're doing all development work locally in a MAMP setup that way. I am using Netbeans btw and a separate Git client named SourceTree and GitHubs Desktop for checking out repos locally.

  • vincent3569 Member
    edited February 2019

    my experience:

    I use Github Desktop (https://desktop.github.com/)
    I clone locally zenphoto that I keep sync with Desktop. I pull all zenphoto commits and sometimes I push some commits (mainly as french translator).

    I also made a fork of zenphoto (called zenphoto-dev) because I use personnal hacks of the core (I haven't push them to github and I use these hacks locally). Sometimes I also push pull request to zenphot team as contributor.
    now, with desktop I can keep it sync with zenphoto commits.
    It is a little bit complacated (you have to define zenphoto as upstream and sync my fork from upstream) but It's more simple now since the Desktop team added this use case.

    as I don't have a local server, I manage all files locally, and export theem with ftp on a prod or test server.

  • Hello @vincent3569 and @acrylian

    Happy New Year!

    Thanks for your feedback.

    I come back to you with more ideas.

    I am used to svn for many years and I am learning git as it is definitely the standard today.

    After analysing my need, I would like to go further by deploying a real environment on a private VM to host to a staging and production live web site. The idea is to use git to merge between dev and production branches on 2 different vhosts.
    However, to do that, I didn't find a simple way to use branches in a single repository with 2 vhosts. In the examples I have found, you need at least 2 repos with special hooks, and I am not sure if it is as much convenient to merge between remote repos or branches?

    Some first clues to do that
    https://nvie.com/posts/a-successful-git-branching-model/
    https://gist.github.com/viakodelabs/7a8eed223b73ffcd032746a6ada09ce0
    https://gist.github.com/Nilpo/8ed5e44be00d6cf21f22

    What would you think about that? Do you have any experience in this field? Where do I could find more resources to achieve this?

    Thanks ;-)

  • acrylian Administrator, Developer
    edited January 18

    I am sorry, I have no experience in this area. I/we use GitHub in relative plain way just with local installs for testing and local repositories (on the ZP dev the local install is basically even the repository to avoid manual copying back and forth) from where changes are committed.

    I don't use the command linebut a free client for mac named SourceTree. Only for checkout locally I use the official GitHub client.

  • Thanks for detailing your process...
    I will experiment different deployments and probably set up git hooks, seems to be the best way to test in live...

Sign In or Register to comment.