synx: Breaks git after running

After running synx, the .git folder seems to get destroyed. It is still there, but git does not recognize it as such. I do not get any error messages during the run.

This is a rough distribution of our product, as seen in XCode:

touchapp/   (This is the project file)
    a.bundle
    b.bundle

    Localizable.strings/
        LanguageA.strings (Base)
        LanguageB.strings
        LanguageC.strings

    Images/
        (Just a bunch of images)

    touch/
        Images.xcassets (Launch images, application icons and whatnot)
        SomeGroupWithSomeCode/
            code.h
            code.m
            SubgroupWithSomeMoreCode/
                subcode.h
                subcode.m
        SomeGroupWithSomeMoreCode/
             morecode.h
             morecode.m

    Libraries/
        (A number of git submodules, but also some none libraries and some other external code files)
        (Some have their own .xcodeproj, some have subprojects of their own as well)
    Frameworks/
    Products/

This is roughly how it is reflected in filesystem:

touchapp/
    .git/
    .gitignore
    .gitmodules
    touch.xcodeproj/
    touch/
        LibraryA/
            LibraryA.xcodeproj/
            somecodefromlibrary.h
            somecodefromlibrary.m
        LibraryB/
            (Basically the same as Library A)
        LibraryC/
            libraryheaders.h
            somecode.c
        LanguageA.lproj/
            Localizable.strings
        LanguageB.lproj/
            Localizable.strings
        LanguageC.lproj/
            Localizable.strings
    Images/
    Inline Icons/
    CodeFromExternalParty/
        somecode.h
        somecode.m
    Animation/
    image1.png
    image2.png (and so on for about 50 times)

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 22 (6 by maintainers)

Most upvoted comments

Is this project still maintained? This is still an issue.

Since I don’t know Ruby, I opted to fix these issues using a shell script. You can grab a copy here:

https://gist.github.com/noordawod/ea1a5fc1fb5654fcba509f6e5862a4eb

Managed to get this to reproduce reliably, after a particularly terrifying afternoon.

Works with XCode Version 7.2 (7C68)

  1. Create a new project (I used the template for iOS Single View Application)
  2. Make it into a git repo
  3. Create a storyboard file in the project
  4. Remove the storyboard file reference from XCode
  5. Move the storyboard file into a subfolder at the same level as the .xcodeproj (the name does not appear to matter. I got this bug because I had a storyboard in a “Base.lproj” folder but the bug can be reproduced with a name like “Potato” as well
  6. Drag the storyboard file back into XCode, and don’t copy it
  7. git status --> A-OK 👌
  8. synx projectname.xcodeproj
  9. git status --> EVERYTHING BURNS 🌏🔥🔥🔥🔥🔥🔥💀💀💀💀💀💀

@nunogoncalves @Mark2xv I guess it’s been a long time since you guys have had this problem, but just FYI it seemed to work for me after this: I moved the offending files out of the project structure, removed references in XCode, then dragged them into the project and let xcode put them wherever it wants.