Xcode repository indicators meanings

前端 未结 5 446
终归单人心
终归单人心 2020-12-15 09:14

I wonder what these shortcuts mean and since I already can figure out that \"shortcut\" is not the right word for it, I don\'t even know what to google so I\'ll just strike

相关标签:
5条回答
  • 2020-12-15 09:32

    Maybe you ended up here because you merged two branches together in Xcode and got a bunch of exclamation marks (!) as a result and wonder what they mean, what the actual problem is, and how you get rid of them? If so, do the following:

    1. Navigate to your projects folder and open it in Terminal (easiest by dragging the folder to the Terminal app icon).

    2. Type git push.

    3. Restart Xcode.

    (You may get a warning in 2 if you have uncommitted changes, in that's case just type git commit -m "Your commit comment" and then type git push again.)

    The problem here is just a miscommunication between Xcode and the Git repository, and Xcode probably can't work out whether the marked files have been pushed or not.

    Generally, my experience is that for all inexplicable problems with the source control in Xcode (missing files, not under source control warnings etc) it's best to handle them directly in the project folder with Terminal. Start by typing git status and you'll (mostly) get a quite clear explanation of what's the problem and how to solve it. Good luck!

    0 讨论(0)
  • 2020-12-15 09:35

    From this SO question:

    U: Working file was updated

    G: Changes on the repo were automatically merged into the working copy

    M: Working copy is modified

    C: This file conflicts with the version in the repo

    ?: This file is not under version control

    !: This file is under version control but is missing or incomplete

    A: This file will be added to version control (after commit)

    A+: This file will be moved (after commit)

    D: This file will be deleted (after commit)

    S: This signifies that the file or directory has been switched from the path of the rest of the working copy (using svn switch) to a branch

    I: Ignored

    X: External definition

    ~: Type changed

    R: Item has been replaced in your working copy. This means the file was scheduled for deletion, and then a new file with the same name was scheduled for addition in its place.

    L : Item is locked

    E: Item existed, as it would have been created, by an svn update.

    Note that these are SVN status codes and some of them do NOT apply to XCode as @Zaph pointed in comments. Anyway I think most used are included in this link and are valid in xCode too.

    0 讨论(0)
  • 2020-12-15 09:37

    There are Xcode Source Control management codes, they provide the file status as below:

    • ' ' (Blank) Unmodified
    • 'M' Locally modified
    • 'U' Updated in repository
    • 'A' Locally added
    • 'D' Locally deleted
    • 'I' Ignored
    • 'R' Replaced in the repository
    • '-' The contents of the folder have mixed status; display the contents to see individual status
    • '?' Not under source control

    Status codes From section Store and Track Changes with Source Control of Apple's Xcode documantation.

    0 讨论(0)
  • 2020-12-15 09:39

    It's the modification status of the file : M is for Modified and A is for Added

    0 讨论(0)
  • 2020-12-15 09:47

    These are code version repository indicators.

    M - modified file.

    A - added file.

    ? - untracked file.

    0 讨论(0)
提交回复
热议问题