Step 1 : Open your Android Studio. Please make it sure that you have start with the project which you want to revert.
Step 2: You have a Project tab on your left side. Click on project tab. Project Tab is having to directories that is app and Gradle .
Step 3: Right click on app directory. Select the "Local History" Option and Click on "Show History" . A panel will be appear on your screen.
Step 4: On the left hand side, you will see action which you have made. and On the right hand side, it shows the file on which action has performed.
Step 5: Select the action with respect to the file and make it sure that action that you have selected is related by your file that show your right panel section.
Step 6: Right click on selected action and click on "Revert" option. your file would be reverted itself.