Skip to content Skip to sidebar Skip to footer

Git .gitignore Not Ignoring Previously Tracked Files

I have an Android studio project (imported from eclipse). After I did the import to Andorid studio I did an initial commit and forgot to add the new .gitignore file for Android Stu

Solution 1:

git clean -xf removes all files that matches .gitignore.

Solution 2:

  1. git rm --cached "xxx"
  2. git commit -m ""
  3. git reset HEAD -- "xxx"
  4. git commit -m "" (to update repo)

Solution 3:

Perhaps, you need to use this syntax:

**/build

Post a Comment for "Git .gitignore Not Ignoring Previously Tracked Files"