Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Discard all changes in Xcode 4.2

I have an Xcode 4.2 project that uses git as repository. I make some changes in my source code files. In order to discard changes in one file, I do the following:

  • Select that file in the Source Tree
  • Go to File > Source Control > Discard Changes to discard changes I made in that file

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

like image 287
vietstone Avatar asked Feb 23 '23 14:02

vietstone


2 Answers

File > Source Control > Commit (⌥⌘C), on the left pane select the files you want to reset, right click on selection and click Discard Changes in the context menu.

like image 95
djromero Avatar answered Feb 26 '23 20:02

djromero


From the command line in the git repository you could do

git co -- .

to reset the files to the HEAD revision.

like image 39
John Weldon Avatar answered Feb 26 '23 19:02

John Weldon