DmitryBorodin
DmitryBorodin

Reputation: 4952

How to set global .gitignore file in Android studio

I'm starting to use Android Studio as a git client for my projects. But I cannot find where I can set global .gitignore file for filtering files on any project by default. The same is done in SourceTree in tools-options-git-global_gitignore_list.

Upvotes: 2

Views: 2668

Answers (1)

tro
tro

Reputation: 524

Create a file listing your git ignore patterns and configure it as the global excludesfile. For example, if you're on a Unix-like system and have a .gitignore file in your home directory, you would run:

git config --global core.excludesfile '~/.gitignore'

Android Studio should pick it up automatically (although you may have to restart it). Make sure the git client on your command line is the same as the one AS is configured to use.

Upvotes: 2

Related Questions