Search code examples
gitgitignoreatlassian-sourcetree

How do I ignore all files in a folder with a Git repository in Sourcetree?


I have a Bitbucket Git repository managed with Sourcetree.

I have two folders that I want to commit, but I need to ignore all the files in these folders, because they contain only temporary files.

How can I do that?


Solution

  • Add this to .gitignore:

    *
    !.gitignore