You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me, on a day-to-day basis, the main problem is that worktrees and submodules aren't really supported together out of the box. I've started to build some tooling around that. It isn't yet mature enough to share in tools/bin, but I'm putting it out there so people can try it out.
Please note that you use these scripts at your own risk. They have worked once on my machine (Ubuntu 22.04). They will probably throw strange errors and leave your working directory in a weird state if you try to use them under unexpected conditions. They probably won't directly erase all your files, but they might cause you to accidentally erase all your files when you try to clean up.
Assumption: you have a “main” worktree of mbedtls/path/to/main, where the framework submodule is checked out. You like to work in other mbedtls worktrees where the framework submodule is a worktree of /path/to/main/framework.
[For zsh users] From /path/to/main, create a new worktree to work on a branch, with submodules being also worktrees: adw.zsh.txt (source this from ~/.zshrc)
[For Linux/Mac users] From an alternative worktree of mbedtls where the submodule is not yet initialized, set up the submodule as a worktree: git-worktree-submodules (make it executable and put it in $PATH)
[For Linux/Mac users] Once you're done with a worktree, clean it up, including its submodules which are also worktrees: git-worktree-rm-r.txt (make it executable and put it in $PATH)
Working with Git submodules can be awkward: they aren't always supported separately. We should share scripts to facilitate that.
The text was updated successfully, but these errors were encountered: