Android Studio shows unchanged files in the commit changes dialog

I am using Android Studio 2.0 Beta 6 on Ubuntu GNOME. I got a strange problem. I am using git version control in my Android project. After creating the project, when I click on commit changes through the Android Studio GUI. The Change Changes dialog box displays each file as changed. When I click on any file, it says the contents are identical. I am attaching a screenshot below, clicking on any files, says that the content is identical.

enter image description here

So my question is: why does Android Studio show files with the same changes in the commit changes dialog and how can I solve it? I tried Google but did not find any related questions.

+5
source share
3 answers

This should be due to changes in the automatic encoding of files in the IDE (in case you imported the project from another place). Sometimes IDEs apply them automatically. Just roll back the changes and do a clean and build. If the changes appear again, you will need to commit once, after which you will be fine.

To verify that you can simply navigate to a normally acting file. Open it in notepad and just save as from notepad with a different encoding. After that, in the version control window, it should look like changed.

+2
source

For me, it was an AS pointing to an old version of git. Check the settings \ Version Control \ Git

AS Settings \ Version Control \ GIT

+1
source

I ran into this problem. None of the typical culprits are to blame. As for git (from the command line), the files were unmodified, but Android Studio still showed them as modified.

Turns out Android Studio and my command line terminal (cygwin) used two completely different git binaries. Android Studio pointed to the git installation that I did at some point in the past, while cygwin pointed to / usr / bin / git, which came from the Cygwin git package.

I edited the version control settings of Android Studio (as shown in Anton's picture) to point to git.exe in my Cygwin distribution, and then "update the file status" from the VCS menu, and all the files returned showed as unmodified.

0
source

Source: https://habr.com/ru/post/1245787/


All Articles