I am working in android and I have a file named MainActivity.class
and I am init
that project by using gitbash and I want to get the previous code of MainActivity.class
If I tried this then it will rollback all files to the previous code but I don't want that:
git checkout -f
CodePudding user response:
If you are using Android Studio then It will be lot easier to you. Just follow These Steps
- In left side of your android studio editor you got a commit panel.
- Right Click on that then click on the file you want to rollback
- You got a option named Rollback click
- Then you will see a dialog then choose your file then click rollback.