1

By using the Version Editor, users can compare differences they made between versions, but they can't ask Xcode to recover a older version of the file (a spicified single file) to replace the local version?

Or I can't rollback to a certain revision I committed before, I can only see the history of revisions?

Don't tell me to use snapshot or branch, that's not what I want.

Matt.Z
  • 602
  • 7
  • 19

2 Answers2

1

Mac OS version control is another option to use instead of using Git source control. This is an easy alternative for restoring one file. Xcode automatically supports the built-in version control of Mac OS but doesn't have a built-in viewer or restore capability. To revert back to an earlier version of a file use the Mac's TextEdit application:

  1. Close the Xcode project and open the file in TextEdit
  2. Select menu File-> Revert To-> Browse All Versions
  3. Restore the desired version of the file
  4. Close TextEdit and re-open the project in Xcode
Marcy
  • 4,611
  • 2
  • 34
  • 52
0

It's not quite as bad as having to snapshots, but you are right: Xcode's version control is very limited. You need to either use the command line to revert to previous commits, or use a GUI tool like GitHub for Mac: https://mac.github.com

From the command line, cd into your project directory and use git checkout. This and other git commands are explained in more detail here: http://git-scm.com/book

Jay Versluis
  • 2,062
  • 1
  • 19
  • 18