leeand00
leeand00

Reputation: 26382

What folders/files of a Firefox profile should you exclude from your commit?

I'm trying to store a Firefox profile in git. I've configured it to use a proxy and I want to be able to pull the profile back up when I check the code out again.

As far as I can tell from the documentation there's a Cache folder and an Offline Cache folder that probably shouldn't be included because they are just cached folders, and not any thing of significance to retaining the proxy settings to be used when the Firefox profile is loaded.

Is there anything else in the profile folder that isn't worth including in the commit, because it has nothing to do with:

  1. Preventing the profile from being loaded.
  2. Preventing the proxy settings from being loaded on the next checkout

I've tried adding the following:

# Ignore FF Cache
ProxyProfileFF/cache2/**
ProxyProfileFF/OfflineCache/**
ProxyProfileFF/jumpListCache/**
ProxyProfileFF/startupCache/**
ProxyProfileFF/saved-telemetry-pings/**

# Ignore vim temp files
*~

Upvotes: 8

Views: 1632

Answers (2)

Stefan
Stefan

Reputation: 1934

I prefer the "better safe then sorry approach".

That is exclude everything and only add files really needed, based on https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data. Moreover I don't add files from which I know / think that they store login credentials / passwords (those are marked with NEVER STORE THEM UNENCRYPTED).

Here is the relevant part of my .gitignore,

# ## exclude everything and only allow specific files
*
!.gitignore

# ###################################
# ## FIREFOX
# ##  based on https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data
!profiles.ini
!installs.ini
#
# ## profiles
!Profiles/
!Profiles/*/
#
# ##  bookmarks, downloads & browsing history
!Profiles/*/places.sqlite
#!Profiles/*/favicons.sqlite
!Profiles/*/bookmarkbackups/
!Profiles/*/bookmarkbackups/*
#
# ##  site-specific preferences
!Profiles/*/permissions.sqlite
!Profiles/*/content-prefs.sqlite
#
# ##  search engins
#!Profiles/*/search.json.mozlz4
#
# ##  personal dictionary
!Profiles/*/persdict.dat
#
# ##  autocompelte history
#!Profiles/*/formhistory.sqlite
#
# ##  cookies & passwords
# ##   NEVER STORE THEM UNENCRYPTED
#!Profiles/*/key4.db
#!Profiles/*/logins.json
#!Profiles/*/cookies.sqlite
#
# ##  DOM storage
# ##   NEVER STORE THEM UNENCRYPTED?
#!Profiles/*/webappsstore.sqlite
#!Profiles/*/chromeappsstore.sqlite
#
# ##  Extensions
!Profiles/*/extension*
!Profiles/*/extensions/*
#
# ##  security certificate settings
#!Profiles/*/cert9.db
#
# ##  security device settings
#!Profiles/*/pkcs11.txt
#
# ##  download actions
#!Profiles/*/handlers.json
#
# ##  stored sessions
#!Profiles/*/sessionstore.jsonlz4
#
# ##  toolbar customization
#!Profiles/*/xulstore.json
#
# ##  user preferences
!Profiles/*/prefs.js
!Profiles/*/user.js
#
# ##  containers
!Profiles/*/containers.json

Upvotes: 3

skywinder
skywinder

Reputation: 21426

Here is my .gitignore file:

( that stored in the profile folder ) i.e.

/Users/me/Library/Application Support/Firefox/Profiles/9j5n99pf.default

here is a link to the gist as well

cookies.sqlite
cookies.sqlite-wal
favicons.sqlite-wal
logins.json
places.sqlite-wal
prefs.js
storage/
datareporting/
webappsstore.sqlite
webappsstore.sqlite-wal
weave/
addonStartup.json.lz4
favicons.sqlite
permissions.sqlite
places.sqlite
protections.sqlite
search.json.mozlz4
serviceworker.txt
sessionCheckpoints.json
SiteSecurityServiceState.txt
storage-sync.sqlite
storage.sqlite
bookmarkbackups
saved-telemetry-pings
sessionstore.jsonlz4
addons.json
AlternateServices.txt
content-prefs.sqlite
extensions.json
formhistory.sqlite
xulstore.json

Upvotes: 4

Related Questions