AVEbrahimi
AVEbrahimi

Reputation: 19174

How to ignore whole folder in Android Studio version control?

I tried to ignore a folder in git (.idea/libraries), while using Android Studio, but I had no success, and there is no ignore in context menu, please check attached imageenter image description here

Upvotes: 3

Views: 1763

Answers (2)

Sajib Khan
Sajib Khan

Reputation: 24174

Add a .gitignore file in your Project root (Yad/). Then add .idea/libraries in .gitignore file.

# at first remove git cached
$ git rm --cached .idea 

# ignore '.idea/libraries'
.idea/libraries

$ git status     # see git will ignore changes inside `.idea/libraries` folder 

Upvotes: 2

Marina Liu
Marina Liu

Reputation: 38106

This files and folders are default ignored by git in android studio:

*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild

If you want to do changes, you can go to the project folder and modify .gitignore file.

Upvotes: 0

Related Questions