Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Git only stores some source files, not others

I just reorganized my folder structure. I could not find a way to do it in XCode, so I moved them in Finder, deleted and re-added them in the project. That makes them show up fine in XCode, but the files I moved are no longer under source control. When I edit any of the moved files, they don't get a [M] next to them in the Project Navigator, and when I commit, they are not included.


How do I add the moved files into source control again?


-Ron.

Posted on May 14, 2012 8:54 PM

Reply
18 replies

May 15, 2012 5:58 AM in response to etresoft

Somefiles are still under source control. In the screenshot, do you see the [M] after "Aggregate.h" and "Aggregate.cpp"? That works as expected. When I commit changes, these files are committed just fine. Others, like the "Fnv.cpp" shown in the screenshot, are not.


So source control is still working for some files in the project, just not for others. How do I control source control? Are there any bindings to set up?


-Ron.

May 15, 2012 6:36 AM in response to Ronald Pieket

I think I have found a work-around.


As I mentioned in the original post, I moved certain files in my project into different folders. This broke source control. When committing, the entire folder that contained the moved file, would not show up in the commit window, and neither would the moved files. The context menu for the moved files had no available Source Control actions.


The work-around was to create a new (dummy) source file in each new folder. When committing, the dummy file now showed up in the commit window, as well as the folder it is in, and also all the other files in that folder - the other files that I moved previously.


Those other files, the moved files in the new folder, showed up with an unchecked check box. I checked them. And now they show up in my repository.


Weird. Can't say this is a very intuitive sequence.


-Ron.

May 15, 2012 10:00 AM in response to etresoft

I've been following this thread and my first thought was that using the Finder to move those folders around was asking for trouble.


You've got to use the tool that manages the folder structure internally.


I wouldn't like it if someone pulled the rug out from under me either.


😁


Addendum:


Although one would think that the two applications would use OOP to communicate changes to each other.


Change Control program:


listen for Finder changes


Finder:


send changes to listeners

May 15, 2012 11:17 AM in response to msuper69

Xcode's SCM has always been a disaster. Instead of focusing on core functionality and getting that right, they re-write the SCM layer with each release and screw it up worse than the version that came before. In 1997, I was using Clearcase on Solaris, WinCVS on Windows, and MacCVS on MacOS. I could do anything I needed to do. I could check in, check out, tag, branch, compare files. I could view file statues and histories. I could even do graphical version trees. It was a pleasure.


Fast forward to 2012. Sometimes SCM works, sometimes not. I can use either Git or the CVS "upgrade", subversion. No status. No log. The file comparison is backwards. No graphical version tree. This is progress?


Gee thanks. Now you've got me all riled up. I'm going to go write some Xcode bug reports now...

May 15, 2012 8:37 PM in response to msuper69

I would love to "use the tool that manages the folder structure internally", but I could not find it.


Where did you find it?


-Ron.

Michael Superczynski wrote:


I've been following this thread and my first thought was that using the Finder to move those folders around was asking for trouble.


You've got to use the tool that manages the folder structure internally.


I wouldn't like it if someone pulled the rug out from under me either.


😁


Addendum:


Although one would think that the two applications would use OOP to communicate changes to each other.


Change Control program:


listen for Finder changes


Finder:


send changes to listeners

May 16, 2012 6:44 AM in response to msuper69

But how?


I have not found such a facility. If you have found a way to "manage the project's folder structure from within Xcode", I'd be grateful if you could share the specific steps involved.


-Ron.

Michael Superczynski wrote:


I was referring to the fact that moving folders around in the Finder was confusing Xcode and that you should only manage the project's folder structure from within Xcode.

May 16, 2012 8:27 AM in response to msuper69

Please be more specific. I must be missing something. I see nothing on the navigator pane that will let me "manage the project folder structure"


Are you referring to the "New Group" actions? I found that only changes the presentation in the Navigator pane, and does nothing to manage the folder structure on disk. The folder structure on disk is unchanged, no matter what I do with groups.


I must be missing something. Is there a setting somewhere? A menu item I overlooked? A hotkey? A check box? Please talk to me as if I know nothing, and explain the precise steps I need to take to "use the Navigator pane" to "manage the project folder structure"


User uploaded file

Michael Superczynski wrote:


Use the Navigator pane.

May 16, 2012 10:40 AM in response to Ronald Pieket

Choose New Group from the contextual menu in your screenshot. You can also select some files and choose New Group From Selection, which will create a new group (folder) and move the selected files into that group.


Keep in mind that Xcode groups do not correspond to folders in the file system. If you create a new group named MyGroup, you will not find a MyGroup folder if you go to your project folder in the Finder.

Git only stores some source files, not others

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.