I'm getting text like A,M,? etc after filename in Xcode. This seems to appear after setting up project on SVN. How to remove this one?
They are source control markers
A = added
M = modified
? = not added
If you dont want them there dont create your project with source control on. Make sure the circled box isnt ticked.
Creating anything other than a discardable project without source control is going to make you sad one day.
Learn about Source Control and use it if you are serious about development.
These notations basically tells you about project's files current condition at SVN or server that is hosting your code repository and your local repository. For instance, if you add a new file/class/anything you will see 'A', if you do changes in a file you will see 'M'.
If you still want to remove these words in XCode go to :
file > source control > commit
a window will appear that shows the the changes you have done in files & press commit button. After that these words will be removed.
But wait, before doing anything read about "source control".
Atleast read about these things:
Revisions
Commits
Updates
Related
I'm trying to find some changes I made to some code within a project. This is a team project having multiple contributors.
Is it possible to search for a particular blame within Xcode?
It would be easier for me to search via blame than to remember a particular file and line number.
Inside Xcode, open the left side menu and navigate to Source Control Navigator. You can also do this using the keyboard shortcut cmd2
In there, select the branch you're working on.
In the text box in the top right corner, start typing your version control username and press:
Author:{your-username}
This will show you all commits you have pushed to the repository. You can select a commit to see which files were changed and access the respective files directly from there.
One would think that adding a project to a Workspace in Xcode would be intuitive.
1) But when you add a new project it is added within the existing project - It must be a bug, or is there actually a reason.
2) How do you add a project then (ctr + right click et.)
You could use the plus (+) button on the lower left corner of Xcode IDE to add a new project to a workspace. You must have first a blank workspace, which you could use the menu (New/Workspaces with short cuts ^%N).
To morning I spend some time doing what you asked to. so here are the steps (you can skip if you already have followed some).
Create a new blank work space
Add a project to it by clicking File->Add new files to "Your workSpace" or "command+option+A"
Choose your project folder Or yourproject.xcodeproj file
Just let the indexing finish properly, and congratulations you have added a new project to your xcode work space successfully.
Note: Make sure that project which you are adding is not already opened, Xcode get lil sensitive about that and doesn't show files tree in workspace in that case.
My answer pertains to XCode 5, but should pertain to XCode 4 as well.
In typical Apple fashion, they have given you multiple ways to do the almost the same thing. Very confusing and annoying. There are three ways, and only one way pertains to the original posters question:
(1) Use File --> Add Files to ...
Problem with this, is that it will only add files to workspace if NO project has been selected.
Problem with THAT, is that once you select a project, there is no way I know of to unselect it.
(2) Use the "+" in the lower-left corner.
Problem with that, it is equivalent to using the pull down menu (#1 above)
(3) Right click in the left pane (in an empty area), and you will see "Add files to "
This is the only right way to do it, as it guarantees that the file will be added to the workspace, and not any selected project.
Try all three methods after selecting an existing project, and you will see what I mean.
Based on my previous experience with XCode, Apple will take about 10 more years to fix this sort of thing.
One would think that adding a project to a Workspace in Xcode would be
intuitive.
Of course not, this is Apple, only usable for certain experts...
1) But when you add a new project it is added within the existing project -
It must be a bug, or is there actually a reason
You did miss the drop down selection list "Add to:" in the last of three dialog pages, the place where the location of the .xcodeproj file is specified. There you can select the Workspace you are currently using. So simply use "File" "New..." "Project...", give it a name and select from templates, and NEVER intuitiveley double click on the directory where to place the project file, but be sure to adjust the selection drop down list to your currently open workspace. Of course this choice is never preselected.
I have a Git repository where my project is linked to. It is located somewhere like /Users/a/Documents/Xcode Projects/MyProject. I use Xcode's UI to commit changes and it worked perfectly for a couple of times. But now, out of a sudden, I get this error when trying to commit new changes:
The working copy myproject could not be reached.
Please verify that the working copy is reachable and try again.
As you can see, the message shows my project's name in lowercase and when I check the Repositories in XCode (File - Source Control - Repositories...). I see there are two, apparently identical, repositories (they both link to the same Origin), but one with the name all in lowercase.
The correct one location is /Users/a/Documents/Xcode Projects/MyProject as I told you. But the duplicated one is supposed to be located in /Users/a/Documents/xcode projects/myproject which, of course, does not exist.
Does anybody know why is this happening? Can anybody help me to delete this duplicated repository and make my project link the correct one? So I can keep using the XCode's UI to commit changes in my code.
I found that Xcode 4.2 can behave in two different ways depending on what exactly you select in the File->Open dialog, when opening the project from within Xcode:
The .xcodeproj file
The project folder (containing the .xcodeproj file)
Selecting 1 or 2 and pressing enter wil give me two different repositories with different paths in Xcode's Repositories, so sometimes it helps to close the project, delete both repositories and then open the project in "the right way", say 1 or 2.
I had the same problem. You probably clicked the recent opened project offered at the beginning of Xcode screen. I chose to open the project/workspace from manual selection in the file system and it solved this duplicated working copy issue. Hope it could be a help.
In the project navigator in Xcode, I am not sure what the ? is trying to tell me next to the file name.
I am sure it is not a coincidence that this is the same file that I dragged from my root directory for the project to the Classes folder (because the .mm file was there and I wanted them to be together). The project still compiles just fine, however my code sense broke recently and I am wondering whether this may be part of the issue.
Thanks!
It's the file untracked by source control.
Those characters refer to the source control.
? - Unversioned
M - Modified
A - Added
A+ - Moved/Renamed (R as of Xcode 13)
U - Newer version of a file on source control
More reference here
You can add to source control by selecting the untracked files
Following steps resolved issue for me:
Select all your files with "?"
Right click and select Source Control
Select Add Selected Files
Select Commit Selected Files...
On the popup dialog just drop some comment (no matter what=)
Screen
Those are uncommitted files if your using GIT, you need to right click Source Control>Commit Selected File manually. It should take away the "?" on the new version of Xcode 6.3.2 as of today
Along with all other answers. This shouldn't happen by default UNLESS you have changed the settings in Xcode.
From Xcode Preferences >> Source Control >> make sure 'Add and remove files automatically' is selected
I suddenly get one my file Unversioned (with ? mark), but it was old file.
It was .m file. Before problem occurred, I created copy of it, for making new similar class. I renamed a class and add new file to XCode.
Problem (with old file become Unversioned) was in not renamed comment string at beginning:
//
// MyFirstClass.m
When I renamed it, problem with Unversioned file was resolved.
//
// MySecondClass.m
Hope it'll helpful somebody.
P.S. Additionally maybe needed to remove and copy back this files.
Stage the Unstaged file, if its a working copy and the ? will change to A
I have no idea what these little A and ? mark mean, I do know that the ones with the ? are not in the budle, however they are in the xcode list, they are editable, they are not read only, i see them as marked to be copied into the bundle (as it is phonegap and the whole www dir should be copied)... but somehow it's not going.... what do these little icons mean? A (archive??!?!) ? = (no reference or something...?)
Those are for source control. If you've created a new project in Xcode 4 and not unticked the relevant box, you have a GIT repository automatically.
'A' means that the file is to be added to the repository when next you commit. '?' means that you've added the file to your project but you haven't yet told Xcode what you want to do with respect to source control. You can set what you want to do by right clicking the files or by selecting them and going to File -> Source Control.
In any case, they're completely unrelated to how the project is built.