apeisa Posted March 26, 2011 Share Posted March 26, 2011 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 More sharing options...
ryan Posted March 28, 2011 Share Posted March 28, 2011 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 More sharing options...
bitmatix Posted August 26, 2012 Share Posted August 26, 2012 Hey guys, 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)? Link to comment Share on other sites More sharing options...
ryan Posted August 27, 2012 Share Posted August 27, 2012 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 More sharing options...
Adam Kiss Posted September 3, 2012 Share Posted September 3, 2012 You could do some bash magic in post-merge hook to delete the default stuff (site-default, possibly). One thing I'm not sure about is .gitignore Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now