141

Today I deployed firebase hosting. After deployment, I noticed firebase creates file of .firebase/hosting.ALPHANUM.cache, where ALPHANUM is actually some random baseNN ish value.

Question

  • What is the purpose of this file?
  • More especially, can I add this to .gitignore?
    • Or, I should not?
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Yuki Inoue
  • 3,569
  • 5
  • 34
  • 53
  • 5
    Not sure what this specific file is for, and I can't find it on my system. But you'll usually want to add all `.` files (so `.firebase/*`) to your `.gitignore`. – Frank van Puffelen Sep 01 '18 at 18:04

1 Answers1

177

This file is part of a new feature in Firebase Hosting that minimizes the size the time of a hosting deployment by only uploading the files that changed since the last deployment. It's new in CLI version 4.2.0, and you can read about that on GitHub.

As Frank suggested, you should definitely add the .firebase directory to your .gitignore or equivalent file, since it contains information that's not strictly part of your project, and is likely not applicable for everyone sharing and contributing to your project source code.

Philipp Kief
  • 8,172
  • 5
  • 33
  • 43
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • 33
    For those who want to remove the `.firebase` directory from git tracking: https://stackoverflow.com/a/19095988/3414529 – Michael Hays Jan 28 '19 at 18:07