2

I have been having an issue, git does not recognize changes on any XML file on Android Studio, for example, androidManifest.xml, or any XML file on the res folder. I have used Android Studio as my Git client, I have changed it thinking that the problem was a bug on Android Studio, and now I am using GitHub Desktop, but the problem persists.

The problem is that any change I make to an XML file is not taken, so I keep losing time and work.

I have been looking for a solution, but I can't find a solution anywhere, any ideas?

This is an update of the initial post, I did nothing, just open the .gitignore file, which has only one line:

/build

Also, I opened the file .git/info/exclude, it has a few lines of comments, nothing else and that was it. Then I realized that the changes on every single XML file started to show on GitHub Desktop and also on Android Studio Git-client.

MarioV
  • 108
  • 11
  • Just verifying you checked your `.gitignore` file. – Morrison Chang May 13 '22 at 18:23
  • the file .gitignore file is in my /app/.gitignore, it has just one line: /build – MarioV May 13 '22 at 19:46
  • 1
    So you have no `.gitignore` in ? I would also see if [When would you use .git/info/exclude instead of .gitignore to exclude files?](https://stackoverflow.com/q/22906851/295004) applies to your project/environment. Also note: https://stackoverflow.com/a/22906950/295004 – Morrison Chang May 13 '22 at 19:56
  • Hi Morrison, thanks for the tip, I still don't know why git does not show changes on any XML file, I have been looking up and down, and I do not find any .gitignore file, nor .git/info/exclude that had a line indicating so, but this gave me ideas to start playing with .gitignore. – MarioV May 16 '22 at 19:36

1 Answers1

0

See what would be removed when cleaning up (dry run): git clean -ndX
There may be some .gitignore which lists *.xml; "search in files" helps.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216