I worked on a rust project with multiple repositories but I learned about rust workspace and I want to switch to it. Is there a way to move my other crates into a submodule while saving the git tree of each of the repositories? For example, I have repo a, b, with branches c, d, respectively, and I want to have a workspace with both projects and both branches for each of the projects.
Asked
Active
Viewed 208 times
0
-
Have you taken a look to https://git-scm.com/docs/git-worktree ? – Ôrel Jan 24 '22 at 13:23
-
From what I can see this command doesn't allow me to take branches from different repos – Josephe Jan 24 '22 at 13:42
-
Maybe something like this, with git merge? https://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories (I've never done it myself though) – lkolbly Jan 24 '22 at 16:01