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

 
ramonleenders replied on at Permalink Reply
ramonleenders
Each thing you make for concrete5, I suggest is a package. A package goes into /packages. If you package name is "My Package", your folder will be "my_package" under /packages. So adviced is to have the "my_package" folder (/packages/my_package) committed as a project (Git) root. If you have another project, called "Awesome", you create another folder in /packages, and that's gonna be a separate Git project. This will make it possible to have packages in multiple installs, without completely downloading everything that belongs to that project. If you are talking about COMPLETE website, you should of course upload everything. But I guess that's mostly not the case if you say "theme" designer and not "website developer".

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.
VonUniGE replied on at Permalink Reply
Personally, I use git on the application directory with the following .gitignore file
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.