[Github] Adding .inc file from another repository
So, I have a .inc file in one repository and I want to include it in some of my plugins without having to manually update it every time in every repo.
For example, I want to add the file cromchat.inc from here - https://github.com/OciXCrom/cromchat In the scripting/include folder here - https://github.com/OciXCrom/ChatManager I tried using git submodule add, but I can't figure out how to put it in the correct folder. |
Re: [Github] Adding .inc file from another repository
In git submodule --help you can find
Code:
git submodule [--quiet] add [<options>] [--] <repository> [<path>]Code:
git submodule add https://github.com/OciXCrom/cromchat scripting/cromchatPHP Code:
It would be s e x y if we had something along the lines of NPM. |
Re: [Github] Adding .inc file from another repository
Quote:
Code:
git submodule add https://github.com/OciXCrom/cromchat scripting/include/cromchat? :) |
Re: [Github] Adding .inc file from another repository
Quote:
PHP Code:
Also confusion may arrive because that "/include" path is not automatically added to included paths, you have to do it yourself when compiling or just reference it using a relative path (like I did). I mean it's up to the OP what he wants to do with it, I just posted what I would've done. |
Re: [Github] Adding .inc file from another repository
Thanks, but I want to put the .inc file directly in the include folder and avoid changing the #include line. I tried tricking the system by creating a new repository called "include" that contains only cromchat.inc and adding it in the scripting folder, but it said "scripting already exists in the index". Can I somehow force git to "overwrite" the folder?
|
Re: [Github] Adding .inc file from another repository
In that case you won't be able to have other files under "/include". It's either a normal directory containing files or a submodule.
|
Re: [Github] Adding .inc file from another repository
I see. I'll stick to adding it manually for now since I don't really like the idea of manipulating the #include path. Too many people are using the .inc file and my plugins, so this will probably cause a mess.
|
Re: [Github] Adding .inc file from another repository
When will we see OciXCrom making a RGB chat? c:
|
Re: [Github] Adding .inc file from another repository
Quote:
|
Re: [Github] Adding .inc file from another repository
Quote:
|
| All times are GMT -4. The time now is 01:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.