Xcode now have built-in version control system. how I can check out older version of my current project in a different location?
Thanks
Xcode now have built-in version control system. how I can check out older version of my current project in a different location?
Thanks
You are looking at two steps here:
This is pretty straightforward through the steps in Xcode's documentation (look for "Clone or Check Out a Copy of a Project to Use Locally").
Let's say that we start with a project called "Foo" with a repository created by Xcode. I have already done this and made a couple commits. In the Repository Organizer (Command-Shift-2, followed by switching to the "Repositories" tab) I can see Foo listed on the left side. To clone this repository, click the plus sign at the bottom left of the window (shown below).
Per Apple's instructions, I select "Checkout or Clone Repository...". In the next view I provide the complete path to Foo's repository and continue through the steps. Ultimately, I have two copies of "Foo" in the Repositories Organizer.
Let's assume for the answer that you are using Git.
This question and this question both indicate that checking out a specific revision is not supported in Xcode. You can do it pretty easily in the terminal.
In the screenshot below you can see the commit log of my repository shown in the Repositories Organizer. Commit a04ae8d14d13
is the current HEAD of the repository. Let's say that I want to check out commit ea09c358d44f
.
To do this, I open a terminal, cd
into /Users/David/Documents/Projects/Foo2
and do git checkout ea09c358d44f
. After doing that, you can update the Repository Organizer and see the new view of the commit log.