Xcode now have built-in version control system. how I can check out older version of my current project in a different location?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are looking at two steps here:
Cloning the repository
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.
Checking out an older revision
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
a04ae8d14d13is the current HEAD of the repository. Let’s say that I want to check out commitea09c358d44f.To do this, I open a terminal,
cdinto/Users/David/Documents/Projects/Foo2and dogit checkout ea09c358d44f. After doing that, you can update the Repository Organizer and see the new view of the commit log.