3

I am using Sourcetree as my Git client for version control, and I am coming across an issue where any project I am working on is ignoring one specific file (which happens to be the main.css file).

I have checked the repository specific .gitignore file and it is empty, but the file still does not show up in my file status on Sourcetree.

How do I view the files which are being ignored globally on all projects in order to remove this file as I am currently unable to commit it to the repos and is very frustrating when more than one person is working on the same project.

Bradly Locking
  • 1,415
  • 1
  • 11
  • 6
  • 2
    Don't know Sourcetree but you can do this via **terminal**: run `git config --global core.excludesfile` and this command will output your [**Global ignore file**](http://stackoverflow.com/a/7335487/2752041). Open / edit that file to see what's being ignored globally `cat path/to/my/file`. – mathielo Jul 13 '16 at 09:36
  • That's **exactly** what I needed! found that file and the main.css was sitting in there. Cheers bro – Bradly Locking Jul 14 '16 at 09:38

1 Answers1

2

In order to exclude a file getting ignored, add this to the project's .gitignore,

!main.css

This will exclude the file from getting ignored in the project.

pratZ
  • 3,078
  • 2
  • 20
  • 29