Setting up concrete5 with Git (bitbucket)
Permalink
Hi,
I am a c5 theme designer and never tried version control but now would really like to get started (at some point you'd have to) with it. I intend to use BitBucket for this as they offer unlimited private repo's however, unsure how to get started setting up git with concrete5:
1. Should I initialize git in themes directory or c5's root. If initializing git in root directory is recommended to
exclude "concrete" & "files" and those empty dir's. BTW, how to exclude such directories (& sub-dir's) from git.
2. What about directories such as "packages, blocks, config". Occassionally I make changes/edit files within them.
3. Should I also upload theme images (themes\my_current_theme\images\*) referenced by "themes\my_current_theme\css\theme_style.css" to remote repo.
thanks
dkj
I am a c5 theme designer and never tried version control but now would really like to get started (at some point you'd have to) with it. I intend to use BitBucket for this as they offer unlimited private repo's however, unsure how to get started setting up git with concrete5:
1. Should I initialize git in themes directory or c5's root. If initializing git in root directory is recommended to
exclude "concrete" & "files" and those empty dir's. BTW, how to exclude such directories (& sub-dir's) from git.
2. What about directories such as "packages, blocks, config". Occassionally I make changes/edit files within them.
3. Should I also upload theme images (themes\my_current_theme\images\*) referenced by "themes\my_current_theme\css\theme_style.css" to remote repo.
thanks
dkj
Personally, I use git on the application directory with the following .gitignore file
It's maybe not as clean as with a package but I can update the site from the repository by just doing a git pull. No need to install/uninstall anything.
cache/ config/ files/ *.swp *.swo
It's maybe not as clean as with a package but I can update the site from the repository by just doing a git pull. No need to install/uninstall anything.
Each package has its own /blocks folder, so that will be /packages/my_package/blocks. Same for themes: /packages/my_package/themes. This way you have a very VERY clean Git project. Awesome, right?
Take a look at the community store for example:
https://github.com/concrete5-community-store/community_store...
This will go right under /packages too.