Search code examples
iosxcodegitgit-submodulesworkspace

Xcode push workspace with submodules wrong repository on push


I am trying to cleanup my workspace. I've created a separate reusable static library for the helper functions and another for the main project.

My directory structure is as follows:

SimplyStats/
    SimplyStats/
    externals/GoodStuffIOS

both the main project and the library project have been succesfully pushed/updated/committed to their respective bitBucket repositories.

But when i use XCode to push changes, i get the following dialog:

Source Control Push Dialog

Notice that the Remote repository for the GoodStuffIOS project is at fault. The repository Organiser shows that the repositories are set up correctly. Whatever I do, I cannot fix that remote. How do I fix this?

EDIT: Here are the contents of my .git/config (starred the repo names)

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = false
[branch "master"]
[remote "SimplyStats"]
    url = https://************@bitbucket.org/**********/simplystats
    fetch = +refs/heads/*:refs/remotes/SimplyStats/*
[submodule "externals/GoodStuffIOS"]
    url = https://************@bitbucket.org/**********/goodstuffios.git

Solution

  • Here's what i had to do to fix the problem.

    • Close the workspaces,
    • Go to Organiser/Repositories,
    • then for each relevant project, select in left column and remove by clicking '-'
    • quit XCode
    • verify/clean .git/config
    • verify/clean .gitmodules
    • reopen XCode
    • open workspace