1

I've tried to revert to a desired file state for an android project by using git checkout . as well as through invalidating the cache in IntelliJ, to no avail.

How do I fix this behavior?

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
reactor
  • 1,200
  • 9
  • 22

2 Answers2

1

A git reset --hard should have been enough, but you might have untracked files.

For that, see "How do I clear my local working directory in Git?"

git clean -d -x -f

In both cases, make sure you don't have any work in progress (or save it) *before typing any of those commands.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
0

If you are using Android Studio and your project is connected through VCS it's simple to revert your file by doing this:

  1. Go to VCS => Local History => Show HistoryAccess the local file History via VCS
  2. Then click the Revert button in Upper left Corner Click to the Revert button.

Hope this will help.

Félix Maroy
  • 1,079
  • 1
  • 13
  • 20