Android studio delete file from vcs

I am looking to exclude version versions of files. I see the add button to the vcs in the file, but I do not find the untrack or ignore button, as in eclipse.I tried to exclude the .idea / folder. I am tired of editing gitignore manualy and ignore file button, but nothing works. Any ideas?

Thank you Thomas

+7
git version-control android-studio
source share
1 answer

You can remove tracked files from vcs manually using the Terminal tab in the Android Studio or Git Bash console.

To ignore ignored files, you must:

1) Make sure the files you want to ignore are correctly specified in .gitignore

2) Commit pending changes (important!)

3) Run the commands

git rm -r --cached . git add . 

4) And then lock again:

 git commit -am "Remove ignored files" 

These steps remove all elements from the Git Index and then update it, but Git is ignored.

The reason for making the pending changes in step 2 is that if rm is part of another commit, it does not work properly.

Read more in the comments here .

+17
source share

All Articles