|
| 1 | +#### Kotaemon Project : a DATA4GOOD git subtree folder |
| 2 | + |
| 3 | + |
| 4 | +The folder 'kotaemon' is a git subtree folder, that can be synchronized with the 'root' common project : https://github.com/dataforgoodfr/kotaemon# |
| 5 | + |
| 6 | +This 'root' project hosts all the common / generic tools built by Data4Good. |
| 7 | + |
| 8 | +When you make a code change in your 'local' project, all the code alterations that are included in the 'root' project (the 'kotaemon' folder) could be push to contribute to the 'root' subtree project. (by the use of your intermediary branch like "13_ecoskills_version") |
| 9 | + |
| 10 | +Inversely, you can regularly pull the 'root' main/branch changes. |
| 11 | + |
| 12 | + |
| 13 | +#### Synchronisation commands |
| 14 | + |
| 15 | +To pull the recent changes of your branch / or MAIN branch, from the 'root' common project : https://github.com/dataforgoodfr/kotaemon# |
| 16 | + |
| 17 | +(of course, these are the MAIN branch changes that you commonly want to pull... The changes of your branch should be already shared within you team repo github of the project) |
| 18 | + |
| 19 | +```git subtree pull --prefix=rag_system/kotaemon https://github.com/dataforgoodfr/kotaemon.git [MY_BRANCH or MAIN] --squash``` |
| 20 | + |
| 21 | +Contributing to the "root" project : |
| 22 | + |
| 23 | +To contribute within your branch : |
| 24 | + |
| 25 | +```git subtree push --prefix=rag_system/kotaemon https://github.com/dataforgoodfr/kotaemon.git [MY_BRANCH]``` |
| 26 | + |
| 27 | +Replace [MY_BRANCH] with your branch version : 13_ecoskills_version, 13_sufficiency_version ... |
| 28 | + |
| 29 | +And if the changes are very generics => Do a Merge Request to the MAIN branch with GitHub. |
| 30 | + |
| 31 | +Be Careful ! All changes must be 'generics' to satisfy all projects ... (or explicitly written as '_example' ) |
| 32 | + |
| 33 | +... Please, Exclude "taxonomy" libs from your MR !... |
| 34 | + |
| 35 | + |
| 36 | +###### Little Tips |
| 37 | + |
| 38 | +Loccaly, you can create a git alias for the commands above ... Example (with the main branch of the subtree Project) for the pull command : |
| 39 | + |
| 40 | +```git config --global alias.st-[MY_BRANCH or MAIN]-pull 'subtree pull --prefix=rag_system/kotaemon https://github.com/dataforgoodfr/kotaemon.git [MY_BRANCH or MAIN] --squash' ``` |
| 41 | + |
| 42 | +and for the push command : |
| 43 | + |
| 44 | +```git config --global alias.st-[MY_BRANCH or MAIN]-push 'subtree push --prefix=rag_system/kotaemon https://github.com/dataforgoodfr/kotaemon.git [MY_BRANCH] ' ``` |
| 45 | + |
| 46 | +Now, you can use these alias : |
| 47 | + |
| 48 | + |
| 49 | +```git st-[MY_BRANCH]-pull ``` |
| 50 | + |
| 51 | +or |
| 52 | + |
| 53 | +```git st-[MY_BRANCH]-push ``` |
0 commit comments