Xcode 4 restore file from earlier commit

I have a project in the git repository, and so far I have not found it very useful. I used git before and think it is great, but this time I am using a local repo. I realized that there will be some way to restore files to a previous commit or even the whole project, but I can not find this option?

Is there any way to do this? Or I need to create an affiliate in advance. Because it seems that you should know in advance that something will turn out wrong with us.

Also, I cannot find an opportunity to undo all local changes in my project, effectively returning to my last commit.

+5
source share
3 answers

,

git reset --hard HEAD

. git reset: reset , HEAD. < > . Git Git - Reset, "

. git checkout, HEAD.

+4

.

( IMHO), github: mac /commit/stage xcode.

git, !

, github, - .

. .

'project.xcworkspace' . Xcode .

+2

. , Xcode4 , . , , Create Snapshot, . "". Create Snapshot control + command + s, , + s . .

+1
source

All Articles