-1

Currently i am using Android Studio version 2.2.

Once we add configuration file into .gitignore file of project root directory and then make any changes to ignore files, Still it shows these changed file while committing.

So how can we avoid these files from showing up while committing.

I have tried removing ignore files file from Setting->Version Control->Ignore Files , And restarted the Studio.But is doesn't work.

I have tried to removing previously cached file from git rm -r --cached . And then re-added the gitignore files and added the project again.

But still all the git ignore file shows while committing and leads to problem by mistakenly selecting them.

Anyone who have faced this please guide to remove these git ignore file while committing in Android Studio.

Have tired this but didn't get any help.

Community
  • 1
  • 1
Anshul Kabra
  • 129
  • 17

1 Answers1

0

You need to remove (or "ignore") these files from version control.

One option is:

  1. Close Android Studio;
  2. Remove the files that you need to remove from vcs (probably something like rm -rf .idea/);
  3. Commit your changes;
  4. Make sure that all files that you want are on your .gitignore;
  5. Reopen Android Studio;

Now he will create all files that he needs to execute, such as .idea folder, but you don't need to worry because now they are out of version control.

Victor
  • 5,043
  • 3
  • 41
  • 55
  • It should work with clearing all the file from vcs through rm -r --cached . And then adding the files into git ignore before committing.could you please tell the difference between your suggestion and where am i doing wrong. – Anshul Kabra Feb 08 '17 at 10:57
  • Because if we remove individual files from vcs it takes more time. – Anshul Kabra Feb 08 '17 at 11:01