Un-tracking Files in Git OR Why doesn’t Git Use My .gitignore File?

Recently, while working on a CF / IIS7.5 site, I found that the web.config file was being synced from server to developer and back again.

Obviously this is a bad since that file is specific for each server. Adding [Ww]eb.config to the .gitignore file didn’t stop Git from tracking changes.

Ends up you need to┬áspecifically┬átell Git to stop tracking a file it’s already started to track. You do this using the following simple command:

git update-index --assume-unchanged FILENAME

It took a little bit of time to find the answer, since I was searching incorrectly for “gitignore web.config”, but finally found a concise answer from Samuel Huckins. Thanks Sam!

Detailed Debug Output in IIS7 and Coldfusion

I setup a new IIS7 site with Coldfusion the other day and found that it didn’t matter what debug settings I set in CF administrator, IIS continued to hand me the standard 505 error page.

That’s perfect for a production site, but I’m still doing dev work here. The fix is — like so many Microsoft fixes — hidden away in IIS7.

  1. Open IIS Manager
  2. Traverse to the site you’re interested in and view the settings home
  3. Open the “Error Pages” option in the IIS group.
  4. On the right Actions menu, click “Edit Feature Settings”
  5. In the popup box, select:
    1. “Detailed Errors for local requests…” if you’re serving from your local machine,
    2. “Detailed errors” if you’re serving from any other machine