I'm having difficulty merging from my master branch to a separate branch I've been developing on in quite sometime.
Doing a straight forward merge I get the following:
shell$ git merge master
fatal: cannot read object asd211f3a58febecd4e447szxs733079211c71b7sa '/my/sub/dir/foo~master': It is a submodule!
I never setup the library 'foo' as a submodule explicitly. I made the mistake of moving a library that itself was versioned by git with a .git subdirectory into the main project, that is also a git repository.
Apparently I didn't remove the submodule properly, or something else is seriously broken.
The more pressing issue, is that after the failed merge, I see a staggering amount of project files via 'git status'. There are files 'that have been changed, but not added' in addition to 'Untracked files'. These are not files from my branch, they are files from master.
I'm not even sure how many different levels of broken that is. But this is a two step problem. The submodule in addition to a bunch of files after the failed merge showing up.
What's the best way to clean this repository up?