Jump to content

/wire/ as its own git repo


apeisa
 Share

Recommended Posts

Just started first plans how we will manage our pw-sites and I am really looking clean git based solution here. It is a bit challenge since I am pretty much learning git at the same process (coming from svn camp).

As git doesn't offer ability to clone subdirectories, it is little bit messy to clone whole processwire-project and default site. As pw is so modular, I think those (wire & default site) are pretty much different projects.

Here is similar situation and discussion about that: http://stackoverflow.com/questions/600079/is-there-any-way-to-clone-a-git-repositorys-sub-directory-only

Link to comment
Share on other sites

The way we solve it currently is to not actually have a /site/ dir in the repo, but instead have a /site-default/ dir. That way when you do a "git pull" to update your installation, it should leave your /site/ dir alone (which is in the .gitignore). That's the intention anyway. (I'm also new to git). Granted, PW will create a new /site-default/ dir, which you would then want to remove after an upgrade (or add it to your .gitignore so that it doesn't get pulled).

We could certainly have a /wire/ only repo too, but the /index.php and /htaccess.txt files are an important part of each version, even though they can't be in /wire/. I'm not sure how to handle that... though maybe that would just be a disclaimer for using the /wire/ repo.

Link to comment
Share on other sites

  • 1 year later...
I'm also thinking about how to work with the PW clone and to have my site under version control. Is there any way to define PW a "submodule" from which I can pull (I'm also very new to git)?

You could keep a separate install directory like /src/, with a blank/uninstalled copy of ProcessWire. And then have your live /wire/ a symlink to /src/wire/.

The /index.php and /.htaccess change very rarely, so those I would just replace manually when called for.

You don't want an uninstalled copy of PW to be web accessible to anyone but you. To keep people out of the /src/ directory, you might rename it to be /.src/ (PW blocks access to any dirs beginning with a period) or place it somewhere else, non web accessible.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...