Reputation: 485
I'm building Android source and deleted some .java
files from the framework. I made a repo sync hoping that this restore the deleted file but it didn't happen.
How can I restore this and other deleted files from original source tree?
Upvotes: 4
Views: 2289
Reputation: 4142
If you are using Eclipse you can right-click on the project or folder and select "Restore From Local History".
If the files are already purged from your local history for some reason then it will depend on which source control system you are using and whether you committed your changes.
Upvotes: 0
Reputation: 485
Check damages:
$ repo status
project device/samsung/maguro/ (*** NO BRANCH ***)
-m full_maguro.mk
project frameworks/base/ (*** NO BRANCH ***)
-- media/java/android/media/#AudioSystem.java#
-d media/java/android/media/AudioManager.java
project frameworks/opt/telephony/ (*** NO BRANCH ***)
-d src/java/com/android/internal/telephony/CallManager.java
project packages/apps/Phone/ (*** NO BRANCH ***)
-d src/com/android/phone/InCallScreen.java
-d src/com/android/phone/PhoneUtils.java
restore files:
$ repo forall -c 'git reset --hard ; git clean -fdx'
Upvotes: 2