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,262,500
  • 529
  • 4,410
  • 5,250
reactor
  • 1,722
  • 1
  • 14
  • 34

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,262,500
  • 529
  • 4,410
  • 5,250
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,389
  • 2
  • 16
  • 21