Open devolonter opened 11 years ago
So I should name my repo pub.files.css then? I think an example repo will clarify how the structure should be exactly.
Yes, that's right. You can hold this module at yourselves or make pub as the owner.
Maybe a stupid question but when I clone the pub repo there is a json folder in it but no files? I switched to develop branch and guess you are doing some kind of repo linking (sorry I am not that familiar with scm).
I am a bit confused how I should exactly push my modules into pub.
Oh, and there should be an example folder :)
Yes, I think submodules may confuse many :). OK, a little help (I will describe this in detail in wiki soon)
When you clone repo for the first time, you need to initialize the submodules to get the source code files. To do this, just type in console git submodule update --init
In subsequent times you will need to call only git submodule update
To add module to the repository as a submodule (link) just type in console the following. Example for JSON:
git submodule add git@github.com:pub-monkey/pub.files.json.git files/json
I didn’t think of examples. Yes, I think I should add this folder :)
Ok, and when a normal user downloads the zip file of the master branch he will have all the files right?
Unfortunately, no. But I thought that normal users won’t download anything from the branches. Instead, I wanted to create a public page with a simple archive for download.
By the way, I found a simpler way to clone with submodules. Just: git clone --recursive
P.S. I don’t insist on the use of submodules. Sometimes I think that it can bring an extra headache. It might be worth to use only one repository for development? Although in this case we lose some flexibility. I think we still have to think about it...
I think the user should always be able to get the latest version of the master branch. I haven't used git that long so I can't really judge it but what flexibilty are we loosing when not using submodules?
Anyway, just so I don't do anything stupid. For me to check in my css module I clone the pub module, make my changes and then push back to the remote?
Yes, I agree with you that user should be able to download the master branch. The use of submodules kills this feature so we have to choose something one.
The use of submodules gives us the following advantages:
This is what has now come to my mind. At the same time, the use of submodules makes it difficult to develop, as requires good knowledge of git. But this issue can be solved by writing a quick reference.
You can make changes to the submodule in two ways:
Now I have made some test changes in the pub repository. So do not forget to make git pull
and git submodule update
. Important! Submodule update can be done only if you have not made any changes to submodules locally. Otherwise, you will lose all changes. More about submodules can be found in the documentation.
It seems that everything is getting too complicated! I incline towards one repository more and more :) It’s night here. Let me know what you think about this and I hope we will solve this issue tomorrow .
Yeah, it seems to complicated for the sake of sharing some modules.
I tried pushing to the repo but it seems I don't have write access to pub monkey. (permission denied) using: git push origin develop
I apologize for an access error. It appears that it’s necessary to set the rights for each repository. Fixed it, now everything should be normal.
I agree with you. I deleted submodule and added JSON simply as source code files. To completely get rid of the traces of submodules you'd better make a clone of a repository pub again.
Ok, I think did something wrong. Css is somehow a submodule without a link? I have the module in my own repo. Should I make a completely new one?
I am not that confident with reverting. Sorry for the trouble.
I thought we decided not to use submodules? The error occurred because in the previous commit I removed .gitmodules file and we have a conflict now. I’ve deleted your submodule.
Now just make a clone again and add your module as a source code files (not a submodule). I think it will be easier. I suppose pub.files.css repository can be deleted.
@shinkiro1 I’ve just noticed that you added the CSS module. I am glad that we were able to resolve these issues. Sorry if I misled you with submodules. I think it was a bad idea ...
Yesterday, I also changed the information in the wiki, removed all references about submodules.
Np. I think it's a lot easier this way now. I edited the wiki development entry so everyone is on the same boat.
is there a clean/automated way to maintain a separate repo and just merge changes into pub? I guess I could write a web script to do it, just wonder if anyone knows of a way?
Also added in XML module now to dev branch
I've added some information to wiki. I hope this will clarify some issues. Also feel free to tell me your opinion, perhaps something can be done better
Also, please inform if you need any help-material about git and about working with submodules?