benbyf Posted Tuesday at 09:39 PM Share Posted Tuesday at 09:39 PM 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 Tuesday at 09:54 PM Share Posted Tuesday at 09:54 PM 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 19 hours ago Share Posted 19 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 17 hours ago Share Posted 17 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. 3 Link to comment Share on other sites More sharing options...
AndZyk Posted 13 hours ago Share Posted 13 hours 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 hours ago by AndZyk 2 Link to comment Share on other sites More sharing options...
benbyf Posted 8 hours ago Author Share Posted 8 hours ago @AndZyk do you include /wire/ in your repo then and why? Link to comment Share on other sites More sharing options...
wbmnfktr Posted 2 hours ago Share Posted 2 hours ago I use Git in the project root as well, and only put things in .gitignore I really don't want to have in that repo. Best case scenario is that I have the full project, besides database dumps, in my repo. # .gitignore .ddev/ site/assets/backups/ site/assets/cache/ site/assets/logs/ site/assets/ProCache-* site/assets/pwpc/ site/assets/sessions/ site/config-dev.php Database dumps are a thing of its own. Managed projects are backed up quite often, long time projects with not that many updates will be backed up once every 3 months. From un-Managed projects I keep only the latest version I worked on - most of the time the release day or when something was updated. 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