0

I recently converted a folder of my git repository to a submodule, as in this question. The process works well for the master branch.

However, I've found that when switching to any other branch, I get the following error: The following untracked working tree files would be overwritten by checkout:, listing all files in the converted folder. The only solution seems to be to manually move/delete the folder, and then switch branches. Once I've merged in the changes from master, this resolves, but I'll still need to switch to branches (or historical commits) where I won't be merging any time soon.

Is there any better way to do this? Or a better way to do the folder-to-submodule conversion that would not require this process?

My primary constraint is that I'd like to avoid rewriting history, since this is a repo shared by many others, who would then need to overwrite their local history.

thomas88wp
  • 2,381
  • 19
  • 31

0 Answers0