Discard all changes in Xcode 4.2

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:

  • Select this file in the Source Tree
  • Go to File> Source Control> Undo Changes to discard the changes I made to this file.

But I want to undo all changes in all files of my project. How to do it?

+4
source share
3 answers

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.

+4
source

From the command line in git repository you can do

git co -- . 

to reset files in the HEAD editor.

+2
source

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 .

+2
source

All Articles