Cleanup: remove .gitmodules and add .github/ before subtree add

This commit is contained in:
Ben Aultowski 2026-02-25 21:21:39 -05:00
parent 46b4c44f18
commit df68b9f645
2 changed files with 49 additions and 0 deletions

View file

@ -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.

0
.gitmodules vendored
View file