I have an Xcode 4.2 project that uses git as a repository. I am making some changes to the source code files. To undo changes in a single file, I do the following:
But I want to undo all changes in all files of my project. How to do it?
File> Source Control> Commit (β₯βC), in the left pane, select the files you want to use reset, right-click on the selection and click Cancel Changes in the context menu.
From the command line in git repository you can do
git co -- .
to reset files in the HEAD editor.
You do not need to go to the commit screen to discard the changes. Just select the file in the Project Navigator and select File> Source Control> Discard Changes .