I have been using Xcode with GitHub. I committed some bad data and I want to revert the merger. How might I do that? Or is there no way of doing it through Xcode? I am using Xcode5.
1 Answers
Xcode does not allow you to do this, but Github for Mac does a good job at bringing back a previous commit: https://mac.github.com
Add your repository to GitHub for Mac, then click the History tab. From the list on the left, pick the commit you'd like to bring back. You'll see what's changed in the window on the right (a diff across multiple files).
To bring back your previous commit, click the little gear icon above the diff window and you'll have two choices: "revert" and "roll back".
From what I understand "revert" undoes only the changes of said commit, whereas "roll back" will change the entire code to the state as it was in this commit. If you only go back a single commit there's no difference, but when you go back several commits then "roll back" is like going back in history, while "revert" leaves the other commits intact.

- 2,062
- 1
- 19
- 18