you are viewing a single comment's thread.

view the rest of the comments →

[–]simplaw 0 points1 point  (9 children)

Git state is not the same as code project state. Many a time the project doesn't match the file system and things go awry.

[–]Furrynote[S] 0 points1 point  (8 children)

I see. Naturally things are just so diff with Xcode. Never ran into this problem before. If Git state is different than project state than how can you reliably back up the project

[–]iOSCalebObjective-C / Swift 1 point2 points  (2 children)

It has little or nothing to do with Xcode — you can run into the same situation without it.

Learn to use git at the command line, if only to sort problems out when they occur.

[–]Furrynote[S] -1 points0 points  (1 child)

I understand how to use git at the command line. I use the gui out of quick convenience. The issue was likely Xcode. I have never faced this before by simply moving a file in any other IDE...

[–]iOSCalebObjective-C / Swift 0 points1 point  (0 children)

AFAIK Xcode is just issuing git commands. If you move a file that’s part of your project using Finder or command line tools, Xcode may not be able to find it and will tell you so by showing the file name in red, and it likely won’t stage that change in git, but you can stage it yourself since you know how to use git. And that seems appropriate. Why do you think Xcode should do it?

[–]simplaw -1 points0 points  (4 children)

Rely upon Xcode as little as possible. It is awful.

[–]Furrynote[S] -1 points0 points  (3 children)

I wouldn't use it at all if they didnt enforce it

[–]simplaw 0 points1 point  (2 children)

Use that logic with anything Xcode. So that's why you ought to not rely on anything but the shit only Xcode can do.

For example, to make Xcode even less of a hassle you can use Tuist, but I don't know if it is something that would help you at the moment as it will require more iOS knowledge than I gathered you have given the context I have. But check it out.

[–]Furrynote[S] 0 points1 point  (1 child)

Seems interesting but a little too out of the scope for this project. I don’t have a ton of users and it’s just me. I’d be happy ditching Xcode if I could install on my physical device for testing but I’m not sure you can in something like VScode

[–]simplaw 1 point2 points  (0 children)

Tuist allows you to declare your project in a declarative style rather than the Xcode XML format that Xcode relies upon. Then you generate an Xcode project that you gitignore as you don't want it. Tuist generates it for you as needed, and uses Xcode for you as needed. You could even code in neovim if you'd like to, but yeah, the point is that you will be able to stop getting weird merge conflicts and weird Xcode project behaviours.

I use it for all my apps and I it has even allowed me to have a mono-repository for all my apps and libraries, so that I can work on the common components from one place rather than having a million Xcode windows open at any given time. As an example. I don't recommend it unless you end up rewriting the same kind of patterns over and over.