36

Xcode 4 is showing me grey "M" and "A" icons next to my files in the project navigator. I believe they're related to source control.

The point is this: All my old Xcode 3 projects opened and edited in Xcode 4 don't show these icons! My new project which I created in Xcode 4 isn't under source control either.

When I created the project I unchecked the "Git" option. But Xcode still shows me a "Source Control" info in the inspector when clicking on a file. All files initially created by the project template are marked as "committed" where as all files I add myself are not. So either Xcode ignored my wish not to use Git or it's a bug, or both.

Update: Some recommend deleting the .git folder. Since it starts with a dot it's probably a hidden folder, and therefore I made hidden files visible in Finder using this trick in Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

However, it appears that there is NO .Git folder in my project folder (checked all containing folders). But still, Xcode is putting my new projects under source control even though the Git checkbox is disabled.

How can I get rid of it if I don't want to use source control yet?

Proud Member
  • 40,078
  • 47
  • 146
  • 231

11 Answers11

58

Those characters refer to the source control.

  • ? - Unversioned
  • M - Modified
  • A - Added
  • A+ - Moved / renamed
  • U - Newer version of a file on source control
  • I - Item is being ignored (e.g. with the svn:ignore property).
  • ! - Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).

Ref: http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.status.html

Moin Shirazi
  • 4,372
  • 2
  • 26
  • 38
27

Yes, it is related to source control.

"M" means the file has been modified since the last commit, and "A" means the file has been added since the last commit.

If you're using git, you can remove source control by deleting the .git directory in your project folder.

edc1591
  • 10,146
  • 6
  • 40
  • 63
24

enter image description here

This is taken from Sam's Book. I am having trouble finding information in Xcode Documentation.

ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
15

As others have said, they're related to source control. If you've made sure that no .git or .svn directories appear in your project and they still show up, then it's just an Xcode bug. Ignore it or file a bug with Apple.

On a side note, you SHOULD be using source control.

wadesworld
  • 13,535
  • 14
  • 60
  • 93
  • I hate to start a source control pro/con discussion. But when you create a simple test project just to try some new stuff very quick, it's just annoying to have to wrap your head around all this extra bloat for nothing. – Proud Member Jan 14 '12 at 17:02
  • Is there the possibility that Xcode creates the .git repository folder somewhere outside my project folder? – Proud Member Jan 14 '12 at 17:03
  • If it is just a quick test project, then you're right - you don't need source control. But, no, I don't think there's a possibility that git creates the folder outside of your project folder. Do keep in mind that if Xcode didn't create the top-level directory, you can end up with a nested project folder. That is if you create a folder called test and then create a project there called test, you'll get test/test and .git would be in the second-level folder. – wadesworld Jan 14 '12 at 17:55
8

The "M" is for "modified" and the "A" is for added. These values reflect the version control state of the files

Tim Dean
  • 8,253
  • 2
  • 32
  • 59
2

Tags such as "M" or "A" next to files in Xcode indicates that your project in under SVN/GIT repository. "M" indicates content of file Modified whereas "A" for file Added.

It is recommended to keep your project under SVN/GIT provision.

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
2

Those icons stand for Added / Modified files under source control, like other devs pointed out.

If you're experiencing that these icons appear even if you did not check the "Git" checkbox when creating a new project, and if you're sure your project is not really under source control, then just do this:

Restart Xcode, and the issue is gone for your project. The icons disappear and everything is fine :-)

It's a weird Xcode Bug.

Proud Member
  • 40,078
  • 47
  • 146
  • 231
  • If restarting doesn't work. Assuming **YOU ARE NOT, REPEAT NOT** actually using the source control in XCode. highlight everything in the project navigator, menu File -> and try RefreshStatus or even MarkAsResovled. One of those will clear away the flag indicators. – Fattie Oct 21 '13 at 21:50
1

I'm guessing you opted to create a local git repository when you created the project. They are indeed related to source control and they mean "Modified" and "Added". The reason they're not showing for your old projects will be because you're not using source control with them, but like I say, I reckon you opted to create a local git repository when you created the projects.

mattjgalloway
  • 34,792
  • 12
  • 100
  • 110
  • Definitely not. I checked two more times and created new projects, making very sure the Git checkbox is unchecked. Xcode ignores that. – Proud Member Jan 14 '12 at 16:56
0

The icons are always there in XCode 4.5, version control or not

Leander
  • 612
  • 7
  • 8
0

It's great to have folks provide clarification on the meaning of the different source control status.

Now, specific to your question about the "!" identifier, it is likely that you had moved files outside of Xcode. So, even if they are not 'missing', they will be identified as having changed without purview by Xcode.

To get Xcode to accept the changed source files, do a commit. HOWEVER, Xcode will specifically not select files marked with ! for commit. You will notice to the left of all files that there is a checkbox available. If you did indeed intend for the files to be altered outide of Xcode, then select these and commit them. You will find that the ! symbol is removed afterwards.

Justin Ngan
  • 1,050
  • 12
  • 20
0

And if you use subversion, this is of course related to it, so remove .svn directories

tomsoft
  • 4,448
  • 5
  • 28
  • 35