diff options
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. |
