diff --git a/.github/prompts/plan-graphicsComponentsSrc.prompt.md b/.github/prompts/plan-graphicsComponentsSrc.prompt.md new file mode 100644 index 0000000..a45b307 --- /dev/null +++ b/.github/prompts/plan-graphicsComponentsSrc.prompt.md @@ -0,0 +1,49 @@ +# Plan: Convert Submodule to Git Subtree for graphics-components-src + +## 1. Remove the submodule (if present) +- Remove the submodule and its config: + ```sh + git submodule deinit -f graphics-components-src + git rm -f graphics-components-src + rm -rf .gitmodules + ``` + +## 2. Add the upstream repo as a remote (if not already) +- Add the original repo as a remote: + ```sh + git remote add upstreamRepo https://github.com/reuters-graphics/graphics-components.git + git fetch upstreamRepo + ``` + +## 3. Add the code as a subtree +- Import the code into your repo: + ```sh + git subtree add --prefix=graphics-components-src upstreamRepo main --squash + ``` + - Replace `main` with the correct branch name if needed. + +## 4. Make your own changes +- Edit files in `graphics-components-src` as needed. +- Commit your changes as normal. + +## 5. Pull in upstream changes later +- When you want to update from upstream: + ```sh + git fetch upstreamRepo + git subtree pull --prefix=graphics-components-src upstreamRepo main --squash + ``` + - Resolve any conflicts and commit. + +## 6. Push your repo as normal +- All code (including the subtree) is in your repo. +- Push as usual: + ```sh + git push + ``` + +--- + +**Summary:** +- Use `git subtree add` to import the code. +- Use `git subtree pull` to update from upstream. +- Make and commit your own changes as usual. diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000