diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-02 23:31:24 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-02 23:31:24 +0100 |
| commit | 45c3b49ff4be1cd0b3982a8d8b851227c7e9327f (patch) | |
| tree | 12ec35e656b9407e28f6287bbf299303e87e21be /doc/HOWTO.md | |
| parent | 0544a8ee2ec5e031af95ea2f293e2e54398fdcd4 (diff) | |
docs: Add submodule update instructions to HOWTO.md
Diffstat (limited to 'doc/HOWTO.md')
| -rw-r--r-- | doc/HOWTO.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/HOWTO.md b/doc/HOWTO.md index e97380e..d402453 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -119,6 +119,47 @@ cd .. ## Tools +### Updating Submodules + +To ensure all `third_party/` submodules are updated to the latest "Tip of Tree" (ToT) from their respective remote repositories and to resolve any local diffs, follow these steps: + +1. **Enter the submodule directory** (e.g., `third_party/wgpu-native`): + ```bash + cd third_party/wgpu-native + ``` + +2. **Fetch the latest changes from the remote**: + ```bash + git fetch + ``` + +3. **Identify the default branch** (e.g., `main`, `master`, `trunk`). You can see remote branches with `git branch -r`. For `wgpu-native`, the main development branch is typically `trunk`. + +4. **Checkout the default branch and hard reset to its remote state** (this discards any local changes and ensures a clean ToT): + ```bash + git checkout trunk + git reset --hard origin/trunk + ``` + (Replace `trunk` with the correct branch name if different for other submodules.) + +5. **Return to the superproject's root directory**: + ```bash + cd ../.. + ``` + +6. **Update the superproject's record of the submodule**: This stages the change in the superproject's `.git` index, updating the commit hash for the submodule. + ```bash + git add third_party/wgpu-native + ``` + +7. **Commit the submodule update** in the superproject: + ```bash + git commit -m "chore: Update third_party/wgpu-native submodule" + ``` + (Adjust the commit message as appropriate for other submodules.) + +Repeat these steps for any other submodules in `third_party/` that need updating. + ### Spectrogram Tool (`spectool`) A command-line tool for analyzing WAV and MP3 files into spectrograms and playing them back. |
