benbyf Posted 14 hours ago Share Posted 14 hours ago Feel like this is a perennial question and probably a duplicate...BUT I have a load of new PW sites and in the past I've git'ed on the template/ folders to gitlab, bitbucket, github or similar. What are people doing to version control with PW as I would love to add more than the templates folder ideally (as I often make custom Modules) but wondered what people's strategies are? Link to comment Share on other sites More sharing options...
elabx Posted 13 hours ago Share Posted 13 hours ago Might be easier to tell what I exclude which is: /site/assets /vendor multiple things like "site/modules/ComposerModule" , example of any module that I manage through composer rather than git. .env - I do this to be able to include config.php in version control. On my todo is to try: https://github.com/uiii/processwire to also handle PW core as a composer dependency. 1 Link to comment Share on other sites More sharing options...
cwsoft Posted 6 hours ago Share Posted 6 hours ago Similar here. I init my PW Git repos inside the site folder and to exclude some stuff via .gitignore. 1 Link to comment Share on other sites More sharing options...
da² Posted 3 hours ago Share Posted 3 hours ago I add to Git site and wire. On wire I have some Git patches that I may apply again after updating to a new version, and each wire version may solve or add bugs, so I add it to version control. So .gitignore files exclude vendor directory and : Quote site/assets/cache/**/ site/assets/cache/*.maint site/assets/sessions/sess_* site/assets/logs/*.txt site/templates/css/*.css site/templates/css/*.map I need some files in assets, so I exclude everything that is not needed and keep the rest. I also add the database.sql to Git, a clean version ready to be deployed on a new site. Everytime I do changes in admin I export the DB. 1 Link to comment Share on other sites More sharing options...
AndZyk Posted 16 minutes ago Share Posted 16 minutes ago (edited) I add Git in the root folder and can recommend GitKraken as app. 😀 I have a develop and a master branch and an upstream remote. Our remote repositories are hosted on Bitbucket. This is my current .gitignore file: Spoiler # OS .DS_Store # Visual Studio Code /.vscode/ /*.code-workspace # CodeKit /config.codekit3 /.sass-cache # Node node_modules/ # Apache /.htaccess # Composer /composer.lock /vendor/ # ProcessWire /site/config.php /site/config-dev.php /site/assets/ # SEO /robots.txt /googlec*.html /BingSiteAuth.xml Regards, Andreas Edited 13 minutes ago by AndZyk 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