2

It's awkward to title this without being a little vague so I'm sorry if it's a little unclear. Let me clear things up here.

I'm pretty new to git and I'm using bitbucket so part of this most likely comes from inexperience.

I'm noticing when I push things up to bitbucket, it pushes the "guts" of whatever is in my gitinit folder however with Concrete5 CMS packages, you need the parent folder, because it's referenced by a controller.php file inside.

The basic folder structure of a package in Concrete5 is like this:

Root Dir: packages
     Dir:     my_package_name
                  controller.php (references the above folder name so it can't change)

Right now I'm doing a git init inside the package folder (my_package_name with the above example).

I'm making all my changes using a local Concrete5 install and then committing and pushing them up to bitbucket. That tracks the "guts" of my package well enough but if I were to say, share the bitbucket repo with a coworker and he just downloaded it from bitbucket directly, it would come down like myteamname-my_repo_name-12243343.zip and unzipping that just keeps the folder name with all that extra gobbledygook. It would not install correctly since the package controller is just looking for my_package_name.

So I thought, well, I could just gitinit in the root Dir, packages... however that tracks ALL the packages, it would be a pain in the ass to shuffle through all of them, isolate which files to add and commit not to mention changing the remote repo every time I want to push to bitbucket. I could have 20-30 packages going at once so I don't think that's realistic unless I'm missing some key functionality of git. I definitely do not want them ALL in one repo either.

Outside of manually moving the packages in their parent folder out of my dev environment and then committing / pushing elsewhere, I'm not sure how to best handle this? That seems like a lot of extra work I'd rather not do not to mention leaves open the chance for things to go untracked.

1 Answers1

2

if I were to say, share the bitbucket repo with a coworker and he just downloaded it from bitbucket directly, it would come down like myteamname-my_repo_name-12243343.zip

If your coworker were to clone the Bitbucket repo 'my_package_name', then that would create a 'my_package_name' folder.
But if he/she keeps downloading the BitBucket repo archive, then its name might not be directly what you would expect (but maybe renaming the zip file before unzipping it might be all you need here, or even more simply unzipping in a folder derived from the archive name)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you for that. I'm starting to understand a little better why some people structure their directories in specific ways. For example, I can clone but it brings down the .git folder with it which I definitely don't need at this stage, granted it's not a big deal to just remove it. I guess this is why people structure things in src and dist folders so you can get only what you need. I'll have to re-think how I'm doing this. I think my development area has to be only that, and then when I'm ready to commit I move it over to a structure like that. – SpatialAnomaly Oct 29 '15 at 15:33