Xcode project git repo contains changes of another git repo in commit dialog

56 Views Asked by At

I have 2 Xcode projects both separate git repos, here is how the 2 project folders reside:

desktop/project1
desktop/somefolder/project2

While working with project1, I dragged a sub-directory from project2 to use in project1, this caused something terrible in project1, when I want to Xcode>commit it contains uncommitted changes from project2's repo.

I tried looking for .gitmodules file in project1, but there isn't one.

Any help is appreciated!

1

There are 1 best solutions below

0
AamirR On BEST ANSWER

Removing Xcode derived data from ~/Library/Developer/Xcode/DerivedData fixed this issue.

Dragging files/folders across projects is a common action and I never faced this issue before, I believe its a bug in Xcode 9, filed a bug report.