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!

GZIP and CFHTTP “Connection Failure”

When you enable gzip, or deflate, compression on your server one side effect is your existing cfhttp requests will show “Connection Failure” even though you get an http 200 response. This is because Coldfusion doesn’t know how to decompress the response. Get get around this you need to tell the server to send an uncompressed response. Use this tag to do so.

<cfhttpparam type="header" name="Accept-Encoding" Value="no-compression">