Here's the story:
I have 2 git branches master
and develop
I'm currently on develop
.
I've long since had the source files of a third party library included in my repo in the directory Vendor/MGTwitterEngine
. This code was already merged into master.
Now, on branch develop
, I've removed the library and replaced it with a git submodule and committed.
The problem is I can no longer switch back to the master
branch. If I try, I get the following error:
The following untracked working tree files would be overwritten by checkout:
Vendor/MGTwitterEngine/MGTwitterHTTPURLConnection.h
Vendor/MGTwitterEngine/MGTwitterHTTPURLConnection.m
Vendor/MGTwitterEngine/MGTwitterLibXMLParser.h
Vendor/MGTwitterEngine/MGTwitterLibXMLParser.m
Vendor/MGTwitterEngine/MGTwitterMessagesLibXMLParser.h
Vendor/MGTwitterEngine/MGTwitterMessagesLibXMLParser.m
Vendor/MGTwitterEngine/MGTwitterMessagesParser.h
Vendor/MGTwitterEngine/MGTwitterMessagesParser.m
...
Aborting
git thinks the submodule files are "untracked" and won't replace them with the tracked, non-submodule files in the same location.
How can I get around this issue?